diff --git a/resource-server/src/main/java/com/inhabas/api/web/ContestBoardController.java b/resource-server/src/main/java/com/inhabas/api/web/ContestBoardController.java index 0b0c846a..deb934af 100644 --- a/resource-server/src/main/java/com/inhabas/api/web/ContestBoardController.java +++ b/resource-server/src/main/java/com/inhabas/api/web/ContestBoardController.java @@ -3,6 +3,7 @@ import java.net.URI; import java.util.List; +import javax.validation.Valid; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -191,7 +192,7 @@ public ResponseEntity getContestBoard( public ResponseEntity writeContestBoard( @Authenticated Long memberId, @PathVariable ContestType contestType, - @RequestPart("form") SaveContestBoardDto form, + @Valid @RequestPart("form") SaveContestBoardDto form, @RequestPart(value = "files", required = false) List files) { SaveContestBoardDto saveContestBoardDto = @@ -251,7 +252,7 @@ public ResponseEntity updateContestBoard( @Authenticated Long memberId, @PathVariable ContestType contestType, @PathVariable Long boardId, - @RequestPart SaveContestBoardDto form, + @Valid @RequestPart SaveContestBoardDto form, @RequestPart(value = "files", required = false) List files) { SaveContestBoardDto saveContestBoardDto = diff --git a/resource-server/src/test/java/com/inhabas/api/web/ContestBoardControllerTest.java b/resource-server/src/test/java/com/inhabas/api/web/ContestBoardControllerTest.java index 8a64438b..578d0a28 100644 --- a/resource-server/src/test/java/com/inhabas/api/web/ContestBoardControllerTest.java +++ b/resource-server/src/test/java/com/inhabas/api/web/ContestBoardControllerTest.java @@ -439,4 +439,5 @@ void deleteBoard_Not_Found() throws Exception { // then assertThat(response).contains(NOT_FOUND.getMessage()); } + }