Skip to content

Commit

Permalink
Fix: 배움 나누기 페이지 수식 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongho427 committed May 23, 2024
1 parent 6655a0e commit 1f6e351
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ReadExperiencesRes readExperiences(ReadExperiencesReq readExperiencesReq)
long limit = EXPERIENCE_PAGE_SIZE;
if (category.equals("전체"))
category = null;
long pageCount = experienceRepository.countExperiences(category) / EXPERIENCE_PAGE_SIZE + 1;
long pageCount = (experienceRepository.countExperiences(category) + EXPERIENCE_PAGE_SIZE - 1) / EXPERIENCE_PAGE_SIZE;
if (sort.equals("latest"))
return ReadExperiencesRes.of(page, pageCount, experienceRepository.findExperiencesOrderByLatest(offset, limit, category, user));
else if (sort.equals("review"))
Expand Down

0 comments on commit 1f6e351

Please sign in to comment.