Skip to content
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

Open
wants to merge 5 commits into
base: be/dev
Choose a base branch
from
Open

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jan 19, 2025

차단을 해제하고, 차단 목록을 불러옵니다!
더 고려해야 하는 예외가 있는지 한 번씩 검토 부탁드립니다~~~

closes #450

@github-actions github-actions bot added ✨ feature new feature BE Backend labels Jan 19, 2025
Copy link
Contributor Author

Overall Project 90.08% 🍏
Files changed 100% 🍏

File Coverage
UserController.java 100% 🍏
UserService.java 94.01% 🍏

Copy link
Contributor Author

Overall Project 90.13% 🍏
Files changed 100% 🍏

File Coverage
UserController.java 100% 🍏
UserBlockResponse.java 100% 🍏
UserService.java 94.05% 🍏

Copy link

@HaiSeong HaiSeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아토 수고하셨습니다.
API 디자인 관련해서 의견 남겼는데 수요일 오프라인 회의가 있으니 이 시간 이용해서 문제없다고 생각되면 바로 머지 가능할것 같아 우선 approve로 처리합니다.
수고하셨습니다

Comment on lines 96 to 99
@GetMapping("/block/list")
public List<UserBlockResponse> getBlockees(@LoginUser UserInfo userInfo) {
return userService.getBlockeesOf(userInfo.getId());
}

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가 자원의 위치를 나타내야 하는데 위치를 잘 나타내지 못한다는 생각을 했습니다.
아토의 의견 궁금합니다

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);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@tackyu tackyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아토 고생 많으셨습니다.
꼼꼼하게 구현해주셨네요!👍

Comment on lines +169 to +173
assertAll(
() -> assertThat(actual).isEqualTo(expected),
() -> assertThat(userBlockRepository.existsByBlockerIdAndBlockeeId(1L, 2L)).isTrue()

);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BE Backend ✨ feature new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants