public async Task <ActionResult <Recipes.Fermentable> > AddFermentableToRecipe([FromBody] Recipes.Fermentable fermentable, int recipeId) { try { var userId = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value; var recipe = await _recipeService.GetCachedRecipeById(recipeId); if (recipe.UserId != userId) { return(Forbid()); } var result = await _recipeService.AddFermentableToRecipe(fermentable, recipeId); return(Created("", result)); } catch (ExternalServices.RecipeService.RecipeNotFoundException) { return(NotFound()); } }