Don't return error on empty recipe list
This commit is contained in:
parent
571a258c18
commit
b912210bbd
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user