-
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
Changes from 7 commits
9629842
9ed65cb
e5dc633
173c667
a19b81b
36c8fff
7095dc6
a0666fe
f061784
ced3a9b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,11 @@ interface FriendService { | |
friendId: Long, | ||
): AddFriendResponse | ||
|
||
fun acceptFriendRequest( | ||
userId: Long, | ||
friendId: Long, | ||
): AddFriendResponse | ||
|
||
Comment on lines
+44
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 넵 서비스단 메서드에 주석문 추가하도록 하겠습니다!! |
||
fun deleteFriend( | ||
userId: Long, | ||
friendId: Long, | ||
|
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 사용을 지양하는 게 좋을까요,,?