Add Database Layer for Recipe Scaling (#506)

* move badge

* fix add individual ingredient

* fix redirect issue

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-06-12 22:23:23 -08:00
committed by GitHub
parent 0a927afaa0
commit e95ca870b1
18 changed files with 298 additions and 62 deletions

View File

@@ -76,6 +76,9 @@ def get_recipe(recipe_slug: str, session: Session = Depends(generate_session), i
recipe: Recipe = db.recipes.get(session, recipe_slug)
if not recipe:
raise HTTPException(status.HTTP_404_NOT_FOUND)
if recipe.settings.public or is_user:
return recipe