Пример #1
0
 public IActionResult AddIngredientsToShoppingList([FromBody] RecipeToShoppingListRequestApiModel model)
 {
     try
     {
         recipeService.AddRecipeIngredientsToShoppingList(model.RecipeId, model.NumberOfPersons, model.ShoppingListIdId, model.OnlyUnavailableItems);
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
     return(Ok());
 }