From 1da1b0e097b4c7f8b0208fd052d39ec0d9517d71 Mon Sep 17 00:00:00 2001 From: jableader Date: Sun, 22 Sep 2024 12:26:49 +1000 Subject: [PATCH] Fixed saving recipe --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 410ee7b..2c12da9 100644 --- a/main.py +++ b/main.py @@ -104,7 +104,7 @@ async def get_recipe(recipe_id: int, conn: sqlite3.Connection = Depends(get_db)) return r -@app.post('/recipes/') +@app.post('/api/recipes') async def create_recipe(recipe: recipes.Recipe, conn: sqlite3.Connection = Depends(get_db), user: persons.Person = Depends(cookie_person)) -> recipes.Recipe: if not recipe.ingredients: return JSONResponse(status_code=400, content={'message': 'Recipe must have at least one ingredient'})