diff --git a/src/main/java/com/gamzabat/algohub/feature/group/studygroup/controller/StudyGroupController.java b/src/main/java/com/gamzabat/algohub/feature/group/studygroup/controller/StudyGroupController.java index e02819ab..b19e60aa 100644 --- a/src/main/java/com/gamzabat/algohub/feature/group/studygroup/controller/StudyGroupController.java +++ b/src/main/java/com/gamzabat/algohub/feature/group/studygroup/controller/StudyGroupController.java @@ -168,11 +168,11 @@ public ResponseEntity editStudyGroupVisibility(@AuthedUser User user, return ResponseEntity.ok().build(); } - @GetMapping(value = "/{targetUserId}/list") + @GetMapping(value = "/{userId}/list") @Operation(summary = "타 유저 그룹 목록 조회 API", description = "유저가 보이도록 설정해놓은 유저가 참여하고 있는 그룹 모두 조회") public ResponseEntity getOtherUserStudyGroupList(@AuthedUser User user, - @RequestParam @PathVariable Long targetUserId) { - GetStudyGroupListsResponse response = studyGroupService.getOtherStudyGroupList(targetUserId); + @RequestParam @PathVariable Long userId) { + GetStudyGroupListsResponse response = studyGroupService.getOtherStudyGroupList(userId); return ResponseEntity.ok().body(response); } } diff --git a/src/main/java/com/gamzabat/algohub/feature/user/controller/UserController.java b/src/main/java/com/gamzabat/algohub/feature/user/controller/UserController.java index b0fc5046..468f096c 100644 --- a/src/main/java/com/gamzabat/algohub/feature/user/controller/UserController.java +++ b/src/main/java/com/gamzabat/algohub/feature/user/controller/UserController.java @@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PatchMapping; +import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -128,10 +129,11 @@ public ResponseEntity checkNickname(@RequestParam String nickname) { return ResponseEntity.ok().build(); } - @GetMapping(value = "otheruser-info") + @GetMapping(value = "/{userId}/info") @Operation(summary = "타회원정보조회 API") - public ResponseEntity getOtherUserInfo(@AuthedUser User user, @RequestParam Long targetUserId) { - UserInfoResponse userInfo = userService.otherUserInfo(user, targetUserId); + public ResponseEntity getOtherUserInfo(@AuthedUser User user, + @RequestParam @PathVariable Long userId) { + UserInfoResponse userInfo = userService.otherUserInfo(user, userId); return ResponseEntity.ok().body(userInfo); } }