@@ -4,8 +4,11 @@ import com.routebox.routebox.application.user.CheckNicknameAvailabilityUseCase
44import com.routebox.routebox.application.user.GetUserProfileUseCase
55import com.routebox.routebox.application.user.GetUserUseCase
66import com.routebox.routebox.application.user.UpdateUserInfoUseCase
7+ import com.routebox.routebox.application.user_mobile.UpdateUserMobileUseCase
78import com.routebox.routebox.controller.user.dto.CheckNicknameAvailabilityResponse
89import com.routebox.routebox.controller.user.dto.UpdateUserInfoRequest
10+ import com.routebox.routebox.controller.user.dto.UpdateUserMobileRequest
11+ import com.routebox.routebox.controller.user.dto.UpdateUserMobileResponse
912import com.routebox.routebox.controller.user.dto.UserProfileResponse
1013import com.routebox.routebox.controller.user.dto.UserResponse
1114import com.routebox.routebox.domain.validation.Nickname
@@ -25,6 +28,7 @@ import org.springframework.web.bind.annotation.GetMapping
2528import org.springframework.web.bind.annotation.ModelAttribute
2629import org.springframework.web.bind.annotation.PatchMapping
2730import org.springframework.web.bind.annotation.PathVariable
31+ import org.springframework.web.bind.annotation.PutMapping
2832import org.springframework.web.bind.annotation.RequestMapping
2933import org.springframework.web.bind.annotation.RestController
3034
@@ -37,6 +41,7 @@ class UserController(
3741 private val getUserProfileUseCase : GetUserProfileUseCase ,
3842 private val checkNicknameAvailabilityUseCase : CheckNicknameAvailabilityUseCase ,
3943 private val updateUserInfoUseCase : UpdateUserInfoUseCase ,
44+ private val updateUserMobileUseCase : UpdateUserMobileUseCase ,
4045) {
4146 @Operation(
4247 summary = " 내 유저 정보 조회" ,
@@ -106,4 +111,20 @@ class UserController(
106111 val updateUserInfo = updateUserInfoUseCase(request.toCommand(userPrincipal.userId))
107112 return UserResponse .from(updateUserInfo)
108113 }
114+
115+ @Operation(
116+ summary = " 유저 푸시 정보 입력" ,
117+ security = [SecurityRequirement (name = " access-token" )],
118+ )
119+ @ApiResponses(
120+ ApiResponse (responseCode = " 200" ),
121+ )
122+ @PutMapping(" /v1/users/mobile" )
123+ fun updateUserMobile (
124+ @AuthenticationPrincipal userPrincipal : UserPrincipal ,
125+ @ModelAttribute @Valid request : UpdateUserMobileRequest ,
126+ ): UpdateUserMobileResponse {
127+ val id = updateUserMobileUseCase(request.toCommand(userPrincipal.userId))
128+ return UpdateUserMobileResponse (id)
129+ }
109130}
0 commit comments