Skip to content

Commit

Permalink
fix: related endpoint 변경 & 예외처리
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongh00 committed Aug 21, 2024
1 parent b8fb0ed commit 01b5e55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ public class FriendSaveUseCase {

public void acceptFriendRequest(Long userId, Long friendId) {

Friendship friendship = friendQueryService.findByUserIdAndFriendId(userId, friendId);
Friendship friendship = friendQueryService.findByUserIdAndFriendId(friendId, userId);
if (friendship == null) {
throw new UserExceptionHandler(UserErrorCode.FRIEND_NOT_FOUND);
}

friendship.markAsMutual();
friendQueryService.save(friendship);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public ApplicationResponse<List<FriendSearchList>> findFriendList(
}

// 닉네임으로 친구 검색
@GetMapping("/friend/{nickname}")
@GetMapping("/friend/search/{nickname}")
@ApiResponses(
value = {
@ApiResponse(
Expand Down

0 comments on commit 01b5e55

Please sign in to comment.