Skip to content

Commit

Permalink
✨ Add mypage api
Browse files Browse the repository at this point in the history
  • Loading branch information
wonseok committed Jan 5, 2025
1 parent 584b512 commit 7b6d28c
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ class UserController(
): ResponseEntity<UserMeResponse> {
return ResponseEntity.ok(UserMeResponse(user.userId, user.nickname))
}

@GetMapping("/api/mypage")
fun mypage(
@AuthUser user: User,
): ResponseEntity<MyPageResponse> {
return ResponseEntity.ok(MyPageResponse(user.nickname, user.temperature))
}
}

data class SignUpRequest(
Expand All @@ -60,3 +67,8 @@ data class UserMeResponse(
val userId: String,
val nickname: String,
)

data class MyPageResponse(
val nickname: String,
val temperature: Double,
)

0 comments on commit 7b6d28c

Please sign in to comment.