-
Notifications
You must be signed in to change notification settings - Fork 0
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
✨ list blocked users and unblock #451
base: be/dev
Are you sure you want to change the base?
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.
아토 수고하셨습니다.
API 디자인 관련해서 의견 남겼는데 수요일 오프라인 회의가 있으니 이 시간 이용해서 문제없다고 생각되면 바로 머지 가능할것 같아 우선 approve로 처리합니다.
수고하셨습니다
@GetMapping("/block/list") | ||
public List<UserBlockResponse> getBlockees(@LoginUser UserInfo userInfo) { | ||
return userService.getBlockeesOf(userInfo.getId()); | ||
} |
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.
REST api에 가까운 설계는
GET user/me/block
또는 GET user/me/block/list
가 아닐까 생각합니다. (저희가 복수형을 사용했으면 더 자연스러웠을것 같아요 GET users/me/blocks)
uri가 자원의 위치를 나타내야 하는데 위치를 잘 나타내지 못한다는 생각을 했습니다.
아토의 의견 궁금합니다
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.
지금보니 blockUser도 비슷한 느낌이 드는것 같아요.
수요일에 같이 논의 할 수 있으면 좋겠어요!
@@ -85,8 +84,26 @@ public UserBlockResponse blockUser(long blockerId, long blockeeId) { | |||
|
|||
UserBlock userBlock = userBlockRepository.save(new UserBlock(blocker, blockee)); | |||
|
|||
return new UserBlockResponse(new UserResponse(userBlock.getBlocker()), | |||
new UserResponse(userBlock.getBlockee())); | |||
return new UserBlockResponse(userBlock); |
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.
아토 고생 많으셨습니다.
꼼꼼하게 구현해주셨네요!👍
assertAll( | ||
() -> assertThat(actual).isEqualTo(expected), | ||
() -> assertThat(userBlockRepository.existsByBlockerIdAndBlockeeId(1L, 2L)).isTrue() | ||
|
||
); |
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.
👍👍
차단을 해제하고, 차단 목록을 불러옵니다!
더 고려해야 하는 예외가 있는지 한 번씩 검토 부탁드립니다~~~
closes #450