Esempio n. 1
0
        public IActionResult DeleteRecipe(string name)
        {
            var recipe = RecipeData.getRecipeData(name);

            if (recipe == null)
            {
                return(NotFound("No recipe found."));
            }
            var _recipes = RecipeData.deleteData(name);

            if (_recipes.Count == 0)
            {
                return(NotFound("No list found"));
            }
            RecipeData.writeData(_recipes);
            return(Ok(_recipes));
        }