From b912210bbd329eeeb3d092141f385c49be7abc2e Mon Sep 17 00:00:00 2001 From: Reimar Date: Thu, 15 May 2025 10:17:56 +0200 Subject: [PATCH] Don't return error on empty recipe list --- backend/API/BusinessLogic/RecipeLogic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/API/BusinessLogic/RecipeLogic.cs b/backend/API/BusinessLogic/RecipeLogic.cs index 3486171..4a286a1 100644 --- a/backend/API/BusinessLogic/RecipeLogic.cs +++ b/backend/API/BusinessLogic/RecipeLogic.cs @@ -21,7 +21,7 @@ namespace API.BusinessLogic public async Task GetRecipes(int userId) { var recipes = await _dbAccess.ReadRecipes(userId); - if (recipes == null || recipes.Count == 0) { return new ConflictObjectResult(new { message = "Could not find any recipes" }); } + if (recipes == null) { return new ConflictObjectResult(new { message = "Could not find any recipes" }); } var recipeDtos = recipes.Select(r => new GetAllRecipesDTO {