Change Log(0.0.1) - GreenByMe/GreenByMe_Server GitHub Wiki

Paging 처리 후 Dto 변환 및 불필요한 Paging 제거

api/page/mypage

API Response

변경 전

{
	...
  "missionInfoList": [
    {
      "endDate": "2020-08-21T06:10:06.440Z",
      "finishCount": 0,
      "missionId": 0,
      "missionInfoId": 0,
      "missionInfoStatus": "FINISH",
      "missionPictureUrl": "string",
      "progress": 0,
      "remainPeriod": {
        "remainDay": 0,
        "remainHour": 0,
        "remainMin": 0
      },
      "startDate": "2020-08-21T06:10:06.440Z",
      "userId": 0
    }
  ],
	...
}

변경 후

{
	...
  "personalMissions": [
    {
      "endDate": "2020-08-21T06:10:08.193Z",
      "finishCount": 0,
      "missionId": 0,
      "missionPictureUrl": "string",
      "personalMissionStatus": "FINISH",
      "personalMission_id": 0,
      "progress": 0,
      "remainPeriod": {
        "remainDay": 0,
        "remainHour": 0,
        "remainMin": 0
      },
      "startDate": "2020-08-21T06:10:08.193Z",
      "userId": 0
    }
  ],
	...
}

api/page/cert

API Response

변경 전

{
  "missionInfoList": [
    {
      "category": "NONE",
      "certifiaciontTest": "string",
      "current": 0,
      "endDate": "2020-08-21T06:23:46.610Z",
      "finishCount": 0,
      "missionInfoId": 0,
      "pictureUrl": "string",
      "progressRates": 0,
      "startDate": "2020-08-21T06:23:46.610Z",
      "subject": "string"
    }
  ],
  "userId": 0
}

변경 후

{
  "personalMissions": [
    {
      "category": "NONE",
      "certifiaciontTest": "string",
      "current": 0,
      "endDate": "2020-08-21T06:22:32.085Z",
      "finishCount": 0,
      "personalMission_id": 0,
      "pictureUrl": "string",
      "progressRates": 0,
      "startDate": "2020-08-21T06:22:32.085Z",
      "subject": "string"
    }
  ],
  "userId": 0
}

api/page/home

API Request

변경 전

  • JWT
  • ...

변경 후

  • JWT

API Response

변경 전

{
  "expectedCO2": 0,
  "expectedTree": 0,
  "nickName": "string",
  "popularMissionResponseDtoList": {
    "content": [
      {
        "ifEndDate": "2020-08-21T06:24:32.860Z",
        "ifStartDate": "2020-08-21T06:24:32.860Z",
        "missionId": 0,
        "pictureUrl": "string",
        "progressCount": 0,
        "subject": "string"
      }
    ],
    "empty": true,
    "first": true,
    "last": true,
    "number": 0,
    "numberOfElements": 0,
    "pageable": {
      "offset": 0,
      "pageNumber": 0,
      "pageSize": 0,
      "paged": true,
      "sort": {
        "empty": true,
        "sorted": true,
        "unsorted": true
      },
      "unpaged": true
    },
    "size": 0,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "totalElements": 0,
    "totalPages": 0
  },
  "progressCampaign": 0,
  "progressRates": 0,
  "progressResponseDtoList": [
    {
      "endDate": "2020-08-21T06:24:32.860Z",
      "finishCount": 0,
      "manyPeople": 0,
      "missionInfoId": 0,
      "missionTitle": "string",
      "pictureUrl": "string",
      "progress": 0,
      "remainPeriod": {
        "remainDay": 0,
        "remainHour": 0,
        "remainMin": 0
      },
      "startDate": "2020-08-21T06:24:32.860Z"
    }
  ],
  "treeSentence": "string"
}

변경 후

{
  "expectedCO2": 0,
  "expectedTree": 0,
  "nickName": "string",
  "popularMissionResponseDtoList": [
    {
      "ifEndDate": "2020-08-21T06:30:03.338Z",
      "ifStartDate": "2020-08-21T06:30:03.338Z",
      "missionId": 0,
      "pictureUrl": "string",
      "progressCount": 0,
      "subject": "string"
    }
  ],
  "progressCampaign": 0,
  "progressRates": 0,
  "progressResponseDtoList": [
    {
      "endDate": "2020-08-21T06:30:03.338Z",
      "finishCount": 0,
      "manyPeople": 0,
      "missionTitle": "string",
      "personalMissionId": 0,
      "pictureUrl": "string",
      "progress": 0,
      "remainPeriod": {
        "remainDay": 0,
        "remainHour": 0,
        "remainMin": 0
      },
      "startDate": "2020-08-21T06:30:03.338Z"
    }
  ],
  "treeSentence": "string"
}

api/missions

API Response

변경 전

{
  "content": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "endDate": "2020-08-21T06:36:48.942Z",
      "id": 0,
      "pictureUrl": "string",
      "startDate": "2020-08-21T06:36:48.942Z",
      "subject": "string",
      "title": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}

변경 후

{
  "contents": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "endDate": "2020-08-21T06:36:45.101Z",
      "id": 0,
      "pictureUrl": "string",
      "startDate": "2020-08-21T06:36:45.101Z",
      "subject": "string",
      "title": "string"
    }
  ],
  "pageNumber": 0,
  "totalPage": 0
}

api/missions/categorys/{category}

API Response

변경 전

{
  "content": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "endDate": "2020-08-21T06:38:24.094Z",
      "id": 0,
      "passCandidates": 0,
      "pictureUrl": "string",
      "startDate": "2020-08-21T06:38:24.094Z",
      "subject": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}

변경 후

{
  "contents": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "endDate": "2020-08-21T06:37:43.735Z",
      "id": 0,
      "passCandidates": 0,
      "pictureUrl": "string",
      "startDate": "2020-08-21T06:37:43.735Z",
      "subject": "string"
    }
  ],
  "pageNumber": 0,
  "totalPage": 0
}

api/missions/categorys/{category}/daycategory/{datCategory}

API Response

변경 전

{
  "content": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "endDate": "2020-08-21T06:39:19.604Z",
      "id": 0,
      "passCandidates": 0,
      "pictureUrl": "string",
      "startDate": "2020-08-21T06:39:19.604Z",
      "subject": "string",
      "title": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}

변경 후

{
  "contents": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "endDate": "2020-08-21T06:39:29.020Z",
      "id": 0,
      "passCandidates": 0,
      "pictureUrl": "string",
      "startDate": "2020-08-21T06:39:29.020Z",
      "subject": "string",
      "title": "string"
    }
  ],
  "pageNumber": 0,
  "totalPage": 0
}

api/missions/populars

API Response

변경 전

{
  "content": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "expectCo2": 0,
      "expectTree": 0,
      "missionId": 0,
      "missionPictureUrl": "string",
      "passCandidatesCount": 0,
      "subject": "string",
      "title": "string"
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "offset": 0,
    "pageNumber": 0,
    "pageSize": 0,
    "paged": true,
    "sort": {
      "empty": true,
      "sorted": true,
      "unsorted": true
    },
    "unpaged": true
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}

변경 후

{
  "contents": [
    {
      "category": "NONE",
      "dayCategory": "DAY",
      "description": "string",
      "expectCo2": 0,
      "expectTree": 0,
      "missionId": 0,
      "missionPictureUrl": "string",
      "passCandidatesCount": 0,
      "subject": "string",
      "title": "string"
    }
  ],
  "pageNumber": 0,
  "totalPage": 0
}

api/missioninfos => api/personalmissions

API Requset

변경 전

  • JWT

변경 후

  • JWT
  • pageNumber

API Response

변경 전

[
  {
    "endDate": "2020-08-21T06:52:07.522Z",
    "finishCount": 0,
    "manyPeople": 0,
    "missionInfoId": 0,
    "missionTitle": "string",
    "pictureUrl": "string",
    "progress": 0,
    "remainPeriod": {
      "remainDay": 0,
      "remainHour": 0,
      "remainMin": 0
    },
    "startDate": "2020-08-21T06:52:07.522Z"
  }
]

변경 후

{
  "contents": [
    {
      "endDate": "2020-08-21T06:57:40.494Z",
      "finishCount": 0,
      "manyPeople": 0,
      "missionTitle": "string",
      "personalMissionId": 0,
      "pictureUrl": "string",
      "progress": 0,
      "remainPeriod": {
        "remainDay": 0,
        "remainHour": 0,
        "remainMin": 0
      },
      "startDate": "2020-08-21T06:57:40.494Z"
    }
  ],
  "pageNumber": 0,
  "totalPage": 0
}

api/posts/missions/{missionId}

API Requset

변경 전

  • JWT

변경 후

  • JWT
  • pageNumber

API Response

변경 전

[
  {
    "nickName": "string",
    "picture": "string",
    "postId": 0,
    "thumbsUp": 0
  }
]

변경 후

{
  "contents": [
    {
      "nickName": "string",
      "picture": "string",
      "postId": 0,
      "thumbsUp": 0
    }
  ],
  "pageNumber": 0,
  "totalPage": 0
}