Ingredients can now be added to shopping list when a recipe is scheduled
This commit is contained in:
parent
15173c4842
commit
ce3821b94e
12 changed files with 98 additions and 39 deletions
|
|
@ -660,7 +660,13 @@ pub async fn schedule_recipe(
|
|||
check_user_rights_recipe(&connection, &user, ron.recipe_id).await?;
|
||||
if let Some(user) = user {
|
||||
connection
|
||||
.add_scheduled_recipe(user.id, ron.recipe_id, ron.date, ron.servings)
|
||||
.add_scheduled_recipe(
|
||||
user.id,
|
||||
ron.recipe_id,
|
||||
ron.date,
|
||||
ron.servings,
|
||||
ron.add_ingredients_to_shopping_list,
|
||||
)
|
||||
.await
|
||||
.map(|res| {
|
||||
ron_response_ok(common::ron_api::ScheduleRecipeResult::from(res)).into_response()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue