diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/card/controller/CardController.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/card/controller/CardController.java index e37ae6a..c5b3b75 100644 --- a/src/main/java/com/ddabong/ddabongdotchiBE/domain/card/controller/CardController.java +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/card/controller/CardController.java @@ -7,9 +7,9 @@ import org.springframework.web.bind.annotation.GetMapping; 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; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import com.ddabong.ddabongdotchiBE.domain.card.dto.request.CardCreateRequest; @@ -41,7 +41,7 @@ public class CardController { @PostMapping(value = "") public ApiResponse createCard( @UserResolver User authUser, - @RequestPart(value = "request") @Valid CardCreateRequest request + @RequestBody @Valid CardCreateRequest request ) { return ApiResponse.onSuccess(cardService.createCard(authUser, request)); } diff --git a/src/main/java/com/ddabong/ddabongdotchiBE/domain/user/controller/UserController.java b/src/main/java/com/ddabong/ddabongdotchiBE/domain/user/controller/UserController.java index 993d650..915b7aa 100644 --- a/src/main/java/com/ddabong/ddabongdotchiBE/domain/user/controller/UserController.java +++ b/src/main/java/com/ddabong/ddabongdotchiBE/domain/user/controller/UserController.java @@ -10,7 +10,6 @@ import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; import org.springframework.web.bind.annotation.RestController; import com.ddabong.ddabongdotchiBE.domain.global.ApiResponse; @@ -44,7 +43,7 @@ public class UserController { @PostMapping(value = "/join") public ApiResponse join( - @RequestPart(value = "request") @Valid UserJoinRequest request + @RequestBody @Valid UserJoinRequest request ) { return ApiResponse.onSuccess(userService.join(request)); } @@ -83,10 +82,10 @@ public ApiResponse> getMyCards(@UserResolver User user) return ApiResponse.onSuccess(UserQueryService.getMyCard(user)); } - @PatchMapping(value = "/me") + @PatchMapping("/me") public ApiResponse updateMyUser( @UserResolver User user, - @RequestPart @Valid UserUpdateRequest request) { + @RequestBody @Valid UserUpdateRequest request) { return ApiResponse.onSuccess(userService.updateMyUser(user, request)); }