diff --git a/src/main/java/co/kr/jurumarble/vote/controller/VoteController.java b/src/main/java/co/kr/jurumarble/vote/controller/VoteController.java index 3455afb..a750bd9 100644 --- a/src/main/java/co/kr/jurumarble/vote/controller/VoteController.java +++ b/src/main/java/co/kr/jurumarble/vote/controller/VoteController.java @@ -101,14 +101,14 @@ public ResponseEntity getVote(@PathVariable Long voteId) @Operation(summary = "일반 투표 수정", description = "파라미터에 voteId, 바디에 {title, detail, titleA, titleB} json 형식으로 보내주시면 됩니다.") @PutMapping("/{voteId}/normal") - public ResponseEntity updateNormalVote(@PathVariable("voteId") Long voteId, @RequestBody UpdateNormalVoteRequest request, @RequestAttribute Long userId) { + public ResponseEntity updateNormalVote(@PathVariable("voteId") Long voteId, @Valid @RequestBody UpdateNormalVoteRequest request, @RequestAttribute Long userId) { voteService.updateNormalVote(request.toServiceRequest(voteId, userId)); return new ResponseEntity(HttpStatus.OK); } @Operation(summary = "전통주 투표 수정", description = "파라미터에 voteId, 바디에 {title, detail, titleA, titleB} json 형식으로 보내주시면 됩니다.") @PutMapping("/{voteId}/drink") - public ResponseEntity updateDrinkVote(@PathVariable("voteId") Long voteId, @RequestBody UpdateDrinkVoteRequest request, @RequestAttribute Long userId) { + public ResponseEntity updateDrinkVote(@PathVariable("voteId") Long voteId, @Valid @RequestBody UpdateDrinkVoteRequest request, @RequestAttribute Long userId) { voteService.updateDrinkVote(request.toServiceRequest(voteId, userId)); return new ResponseEntity(HttpStatus.OK); }