feat: unify recipe card sections (#1560)

* removed unused import

* moved categories/tags to new recipe card section

* nuked old frontend sort code
minor refactoring

* bug fixes

* added backend recipes filter for tools

* removed debug log

* removed unusued props

* fixed sort for recipes by tool

* added tests for getting recipes by tool
This commit is contained in:
Michael Genson
2022-08-20 13:59:49 -05:00
committed by GitHub
parent 85448b8a18
commit aaeb162dd5
10 changed files with 231 additions and 232 deletions

View File

@@ -213,12 +213,14 @@ class RecipeController(BaseRecipeController):
q: RecipePaginationQuery = Depends(RecipePaginationQuery),
categories: Optional[list[UUID4 | str]] = Query(None),
tags: Optional[list[UUID4 | str]] = Query(None),
tools: Optional[list[UUID4 | str]] = Query(None),
):
response = self.repo.page_all(
pagination=q,
load_food=q.load_food,
categories=categories,
tags=tags,
tools=tools,
)
response.set_pagination_guides(router.url_path_for("get_all"), q.dict())