Skip to content

Commit

Permalink
test/#353: @Valid 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
LJH098 committed Jul 3, 2024
1 parent ce4005f commit 30970b8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import javax.validation.Valid;

@RestController
@SecurityRequirement(name = "access-token")
@RequiredArgsConstructor
Expand All @@ -29,7 +31,7 @@ public class CreateFoodController {

@PostMapping("/food")
public ApiResponse<CustomBody<Void>> createFood(
@RequestBody CreateFoodRequest request, @AuthenticationMemberId Long memberId) {
@RequestBody @Valid CreateFoodRequest request, @AuthenticationMemberId Long memberId) {
createFoodUseCase.execute(request, memberId);
return ApiResponseGenerator.success(HttpStatus.OK);
}
Expand Down

0 comments on commit 30970b8

Please sign in to comment.