Skip to content

Commit

Permalink
refactor: RequestPart 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
xxoznge committed Oct 15, 2024
1 parent f2840ba commit 121e4a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -41,7 +41,7 @@ public class CardController {
@PostMapping(value = "")
public ApiResponse<CardCreateResponse> createCard(
@UserResolver User authUser,
@RequestPart(value = "request") @Valid CardCreateRequest request
@RequestBody @Valid CardCreateRequest request
) {
return ApiResponse.onSuccess(cardService.createCard(authUser, request));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -44,7 +43,7 @@ public class UserController {

@PostMapping(value = "/join")
public ApiResponse<UserJoinResponse> join(
@RequestPart(value = "request") @Valid UserJoinRequest request
@RequestBody @Valid UserJoinRequest request
) {
return ApiResponse.onSuccess(userService.join(request));
}
Expand Down Expand Up @@ -83,10 +82,10 @@ public ApiResponse<List<MyCardGetResponse>> getMyCards(@UserResolver User user)
return ApiResponse.onSuccess(UserQueryService.getMyCard(user));
}

@PatchMapping(value = "/me")
@PatchMapping("/me")
public ApiResponse<UserUpdateResponse> updateMyUser(
@UserResolver User user,
@RequestPart @Valid UserUpdateRequest request) {
@RequestBody @Valid UserUpdateRequest request) {
return ApiResponse.onSuccess(userService.updateMyUser(user, request));
}

Expand Down

0 comments on commit 121e4a6

Please sign in to comment.