Skip to content

Commit

Permalink
Merge pull request #82 from DEPthes/fix/sort-currentLike
Browse files Browse the repository at this point in the history
[FIX] 좋아요 누른 순 정렬 기준 modifiedDate로 수정
  • Loading branch information
jisujeong0 authored Aug 21, 2024
2 parents 6d92c31 + 663ec95 commit 966f18f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ private void sortBoardLikes(List<BoardLikeByUserRes> boardLikeByUserResList, Str

// currentLike 기준으로 정렬 및 페이징
private List<BoardLikeByUserRes> sortBoardByCurrentLike(User user, int page, int size, String keyword) {
Pageable pageable = PageRequest.of(page - 1, size, Sort.by(Sort.Direction.DESC, "createdDate"));
Pageable pageable = PageRequest.of(page - 1, size, Sort.by(Sort.Direction.DESC, "modifiedDate"));
Page<BoardLike> boardLikePage;
// 조회, 검색 동일한 메소드 사용하므로 keyword 유무로 구분
if (keyword == null) {
Expand Down Expand Up @@ -254,7 +254,7 @@ private void sortThemeLikes(List<ThemeLikeByUserRes> themeLikeByUserResList, Str

// currentLike 기준으로 정렬 및 페이징
private List<ThemeLikeByUserRes> sortThemeByCurrentLike(User user, int page, int size, String keyword) {
Pageable pageable = PageRequest.of(page - 1, size, Sort.by(Sort.Direction.DESC, "createdDate"));
Pageable pageable = PageRequest.of(page - 1, size, Sort.by(Sort.Direction.DESC, "modifiedDate"));
Page<ThemeLike> themeLikePage;

if (keyword == null) {
Expand Down

0 comments on commit 966f18f

Please sign in to comment.