Skip to content

Commit

Permalink
🦺 retrieve recipes of category
Browse files Browse the repository at this point in the history
  • Loading branch information
oshyun00 committed Aug 4, 2024
1 parent 259a9c9 commit 50c14b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package net.pengcook.category.dto;

public record RecipeOfCategoryRequest(String category, int pageNumber, int pageSize) {
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;

public record RecipeOfCategoryRequest(@NotBlank String category, @Min(0) int pageNumber, @Min(1) int pageSize) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public RecipeStepResponse createRecipeStep(

@GetMapping("/search")
public List<MainRecipeResponse> readRecipesOfCategory(
@ModelAttribute RecipeOfCategoryRequest recipeOfCategoryRequest
@ModelAttribute @Valid RecipeOfCategoryRequest recipeOfCategoryRequest
) {
return recipeService.readRecipesOfCategory(recipeOfCategoryRequest);
}
Expand Down

0 comments on commit 50c14b0

Please sign in to comment.