Adds GET /playlists/{id}/cover (mirrors the track cover endpoint) so
uploaded playlist pictures can actually be served. Also drops the
NotEmpty rule on playlist description, which rejected the blank
description the frontend treats as optional; CreatePlayList now falls
back to the domain's default text instead.
20 lines
531 B
C#
20 lines
531 B
C#
using FluentValidation;
|
|
using Musify.Api.DataTransferObjects.PlayLists;
|
|
|
|
namespace Musify.Api.Validators.PlayLists;
|
|
|
|
public sealed class UpdatePlayListRequestValidator : AbstractValidator<UpdatePlayListRequest>
|
|
{
|
|
public UpdatePlayListRequestValidator()
|
|
{
|
|
RuleFor(x => x.NewName)
|
|
.NotEmpty()
|
|
.MaximumLength(50)
|
|
.When(x => x.NewName is not null);
|
|
|
|
RuleFor(x => x.NewDescription)
|
|
.MaximumLength(256)
|
|
.When(x => x.NewDescription is not null);
|
|
}
|
|
}
|