Skip to content

Commit

Permalink
Merge branch 'release/v1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
HYOSITIVE committed Aug 3, 2024
2 parents becfd97 + e9988cb commit 3d2f2f8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions functions/api/routes/community/communityCategoryPostsGET.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ module.exports = asyncWrapper(async (req, res) => {
const totalPageCount = Math.ceil(totalItemCount / limit);
const currentPage = +page;

// 게시글이 없는 경우
if (totalItemCount === 0) {
return res
.status(statusCode.OK)
.send(util.success(statusCode.OK, responseMessage.NO_COMMUNITY_POST));
}

// 요청한 페이지가 존재하지 않는 경우
if (page > totalPageCount) {
return res
Expand Down
7 changes: 7 additions & 0 deletions functions/api/routes/community/communityPostsGET.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ module.exports = asyncWrapper(async (req, res) => {
const totalPageCount = Math.ceil(totalItemCount / limit);
const currentPage = +page;

// 게시글이 없는 경우
if (totalItemCount === 0) {
return res
.status(statusCode.OK)
.send(util.success(statusCode.OK, responseMessage.NO_COMMUNITY_POST));
}

// 요청한 페이지가 존재하지 않는 경우
if (page > totalPageCount) {
return res
Expand Down

0 comments on commit 3d2f2f8

Please sign in to comment.