Fix query and API bugs: 403 for non-owners, page bounds, lifecycle filters, cover fallback, race-safe inserts, async album delete

This commit is contained in:
2026-09-24 05:14:05 +02:00
parent ab388e6ad6
commit 0e3576922f
90 changed files with 2083 additions and 322 deletions
@@ -0,0 +1,15 @@
using ErrorOr;
namespace Musify.Application.Shared;
public static class AppErrors
{
public static Error NotFound(string entity, object id) =>
Error.NotFound($"{entity}.NotFound", $"{entity} {id} was not found.");
public static Error Forbidden(string entity, object id) =>
Error.Forbidden($"{entity}.Forbidden", $"You do not have permission to modify {entity} {id}.");
public static Error Conflict(string code, string description) =>
Error.Conflict(code, description);
}
@@ -0,0 +1,6 @@
namespace Musify.Application.Shared;
public record PageRequest(int PageNumber = 1, int PageSize = 20)
{
public const int MaxPageSize = 100;
}