Don't return error on empty recipe list

This commit is contained in:
Reimar 2025-05-15 10:17:56 +02:00
parent 571a258c18
commit b912210bbd
Signed by: Reimar
GPG Key ID: 93549FA07F0AE268

View File

@ -21,7 +21,7 @@ namespace API.BusinessLogic
public async Task<IActionResult> 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
{