-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[User] 친구 신청 수락 API 구현 #186
[User] 친구 신청 수락 API 구현 #186
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨어요!!!
userId: Long, | ||
friendId: Long, | ||
requestStatus: FriendRequestStatus, | ||
): Optional<Friend> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional을 사용하는 이유가 있나요? Friend? 타입을 사용하지 않고 Optional을 사용하신 이유가 궁금해요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수락하고자 하는 친구관계를 가져오는 과정에서 null이 반환될 경우, exception처리를 하기에 Optional을 사용하는 것이 더 깔끔한 것 같다고 판단하여 사용했습니다! Optional 사용을 지양하는 게 좋을까요,,?
fun acceptFriendRequest( | ||
userId: Long, | ||
friendId: Long, | ||
): AddFriendResponse | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
내부 구현을 보지 않고도 이 함수가 제공하는 기능이 무엇인지 주석을 달아주면 좋을 것 같아요.
기대하는 동작은 무엇인지 그리고 잘못된 요청을 한 케이스에 어떤 예외가 발생하는지와 같은 정보가 있으면 유지보수할 때, 좋을 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 서비스단 메서드에 주석문 추가하도록 하겠습니다!!
#️⃣연관된 이슈
📝작업 내용