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:
@@ -0,0 +1,17 @@
|
||||
using FluentValidation;
|
||||
using Musify.Api.Models;
|
||||
using Musify.Application.Shared;
|
||||
|
||||
namespace Musify.Api.Validators;
|
||||
|
||||
public sealed class PageQueryValidator : AbstractValidator<PageQuery>
|
||||
{
|
||||
public PageQueryValidator()
|
||||
{
|
||||
RuleFor(x => x.PageNumber)
|
||||
.GreaterThanOrEqualTo(1);
|
||||
|
||||
RuleFor(x => x.PageSize)
|
||||
.InclusiveBetween(1, PageRequest.MaxPageSize);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user