Skip to content

Commit

Permalink
🐛 Fix: 친구 목록 조회 2차 정렬 기준을 닉네임 사전순으로 변경
Browse files Browse the repository at this point in the history
<body>
2차 정렬 기준 변경

- 관련 : #384
  • Loading branch information
hosung-222 committed Oct 23, 2024
1 parent 34c760a commit 557c4c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public ResponseDto<String> rejectFriendRequest(
}

@Operation(summary = "내 친구 목록을 조회합니다. [20명씩 조회]", description = "내 친구 리스트를 보는 API 입니다. "
+ "즐겨찾기에 등록된 친구가 가장 먼저 나오고, 그 후에 최근 추가된 친구들이 조회됩니다. ")
+ "즐겨찾기에 등록된 친구가 가장 먼저 나오고, 그 후에 닉네임 사전 순으로 정렬됩니다. ")
@GetMapping("")
public ResponseDto<FriendshipResponse.FriendListDto> getFriendList(
@AuthenticationPrincipal SecurityUserDetails member,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ public void checkMemberIsFriend(Long memberId, Long friendId) {

/**
* 나의 친구 목록을 가져옵니다.
* !! 즐겨찾기에 등록된 친구가 가장 먼저 나오고, 그 후에 최근 추가된 친구들이 조회됩니다.
* !! 즐겨찾기에 등록된 친구가 가장 먼저 나오고, 그 후에 친구 닉네임 사전순으로 조회됩니다.
* @param memberId
* @param page
* @return
*/
public Page<Friendship> getAcceptedFriendship(Long memberId, int page) {
Pageable pageable = PageRequest.of(page - 1, REQUEST_PAGE_SIZE,
Sort.by(Sort.Order.desc("isFavorite"), Sort.Order.desc("createdAt")));
Sort.by(Sort.Order.desc("isFavorite"), Sort.Order.asc("friend.nickname")));
return friendshipService.readAllRequestFriendshipByStatus(memberId, FriendshipStatus.ACCEPTED, pageable);
}

Expand Down

0 comments on commit 557c4c5

Please sign in to comment.