File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
src/main/java/org/dfbf/soundlink/domain/blocklist Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public ResponseResult blockUser(
2424 @ AuthenticationPrincipal Long userId ,
2525 @ RequestBody String tag
2626 ) {
27- return blockListService .blockUser (1L , tag );
27+ return blockListService .blockUser (userId , tag );
2828 }
2929
3030 @ DeleteMapping
@@ -36,7 +36,7 @@ public ResponseResult unblockUser(
3636 @ AuthenticationPrincipal Long userId ,
3737 @ RequestBody Long blocklistId
3838 ) {
39- return blockListService .unblockUser (1L , blocklistId );
39+ return blockListService .unblockUser (userId , blocklistId );
4040 }
4141
4242 @ GetMapping ("/mypage/blackListSearch" )
@@ -45,6 +45,6 @@ public ResponseResult unblockUser(
4545 description = "해당 유저의 차단 목록을 가져옵니다."
4646 )
4747 public ResponseResult getBlockList (@ AuthenticationPrincipal Long userId ) {
48- return blockListService .getBlockListByUserId (1L );
48+ return blockListService .getBlockListByUserId (userId );
4949 }
5050}
Original file line number Diff line number Diff line change 55public record BlockRes (
66 Long userId ,
77 Long blockedUserId ,
8+ String nickname ,
89 Timestamp createdAt ,
910 Timestamp updatedAt
1011) {
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ public ResponseResult getBlockListByUserId(Long userId) {
9898 .map (block -> new BlockRes (
9999 block .getUser ().getUserId (),
100100 block .getBlockedUser ().getUserId (),
101+ "@" + block .getBlockedUser ().getNickname (),
101102 block .getCreatedAt (),
102103 block .getUpdatedAt ()
103104 )).collect (Collectors .toList ())
You can’t perform that action at this time.
0 commit comments