Skip to content

Commit 9770e98

Browse files
feat: ✨ userId로 current_step 갯수 리턴하는 기능 구현 (#83)
* fix: 내 id 조회 추가 * fix: api 명세 수정 * fix: api 명세 수정 * feat: ✨ userId로 current_step 갯수 리턴하는 기능 구현 --------- Co-authored-by: gzhan0226 <[email protected]>
1 parent dc71a62 commit 9770e98

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/com/goormdari/domain/user/presentation/UserController.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ public ResponseCustom<FindCurrentStepResponse> getCurrentStep(
4949
return ResponseCustom.OK(userService.findCurrentStepById(userId));
5050
}
5151

52+
@Operation(summary = "유저 id로 현재 루틴 수 조회", description = "입력한 유저id 사용자가 완수한 루틴의 개수")
53+
@ApiResponses(value = {
54+
@ApiResponse(responseCode = "200", description = "조회 성공 ", content = {@Content(mediaType = "application/json", schema = @Schema(implementation = FindCurrentStepResponse.class))}),
55+
@ApiResponse(responseCode = "400", description = "조회 실패", content = {@Content(mediaType = "application/json", schema = @Schema(implementation = ErrorResponse.class))}),
56+
})
57+
@GetMapping("/current-step/{userId}")
58+
public ResponseCustom<FindCurrentStepResponse> getCurrentStepByUserId(
59+
@Parameter(description = "userId를 입력해주세요.", required = true) @PathVariable Long userId
60+
) {
61+
return ResponseCustom.OK(userService.findCurrentStepById(userId));
62+
}
63+
5264
@Operation(summary = "현재 유저 정보 조회", description = "유저의 현재 데이터(nickname, username, email, profileImageUrl, goal, deadline, teamId) 조회")
5365
@GetMapping("/info")
5466
public UserInfoResponse getCurrentUserInfo(@Parameter(description = "Accesstoken을 입력해주세요.", required = true) @RequestHeader("Authorization") String token) {

0 commit comments

Comments
 (0)