Example #1
0
def update_recipe(recipe_slug: str,
                  data: Recipe,
                  db: Session = Depends(generate_session)):
    """ Updates a recipe by existing slug and data. """

    new_slug = data.update(db, recipe_slug)

    return new_slug
Example #2
0
def update_recipe(recipe_slug: str, data: Recipe):
    """ Updates a recipe by existing slug and data. """

    new_slug = data.update(recipe_slug)

    return new_slug
Example #3
0
async def update(recipe_slug: str, data: dict):
    """ Updates a recipe by existing slug and data. Data should containt """
    Recipe.update(recipe_slug, data)
    return {"message": "PLACEHOLDER"}