Update routes and changes on queries

This commit is contained in:
2026-05-09 19:09:10 +02:00
parent ef483f0ef3
commit 275ba57c0c
5 changed files with 49 additions and 26 deletions
@@ -14,11 +14,10 @@ namespace Musify.Application.PlayLists.Handlers
{
var playList = await database.PlayLists
.AsNoTracking()
.Select(p => PlayListResponse.FromEntity(p))
.SingleOrDefaultAsync(p => p.Id == request.Id, cancellationToken);
return playList is not null
? Result.Success(PlayListResponse.FromEntity(playList))
: Result.NotFound("Playlist not found");
return playList ?? Result<PlayListResponse>.NotFound();
}
}
}