refactor/recipe-to-snake-case (#364)

* formatting

* snake case all recipes entries

* set foreign key to int

* run scheduler at startup and not import

* set SQLite file path before imports

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-04-28 21:17:49 -08:00
committed by GitHub
parent ee445e7f54
commit 61e0a52100
19 changed files with 107 additions and 104 deletions

View File

@@ -21,4 +21,4 @@ def get_shopping_list(
mealplan: MealPlanInDB
slugs = [x.slug for x in mealplan.meals]
recipes: list[Recipe] = [db.recipes.get(session, x) for x in slugs]
return [{"name": x.name, "recipeIngredient": x.recipeIngredient} for x in recipes if x]
return [{"name": x.name, "recipe_ingredient": x.recipe_ingredient} for x in recipes if x]

View File

@@ -50,11 +50,11 @@ def get_all_recipes(
- description
- image
- recipeYield
- totalTime
- prepTime
- performTime
- total_time
- prep_time
- perform_time
- rating
- orgURL
- org_url
**Note:** You may experience problems with with query parameters. As an alternative
you may also use the post method and provide a body.
@@ -78,11 +78,11 @@ def get_all_recipes_post(body: AllRecipeRequest, session: Session = Depends(gene
- description
- image
- recipeYield
- totalTime
- prepTime
- performTime
- total_time
- prep_time
- perform_time
- rating
- orgURL
- org_url
Refer to the body example for data formats.