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.
18 lines
426 B
C#
18 lines
426 B
C#
using FluentValidation;
|
|
using Musify.Api.DataTransferObjects.PlayLists;
|
|
|
|
namespace Musify.Api.Validators.PlayLists;
|
|
|
|
public sealed class CreatePlayListRequestValidator : AbstractValidator<CreatePlayListRequest>
|
|
{
|
|
public CreatePlayListRequestValidator()
|
|
{
|
|
RuleFor(x => x.Name)
|
|
.NotEmpty()
|
|
.MaximumLength(50);
|
|
|
|
RuleFor(x => x.Description)
|
|
.MaximumLength(256);
|
|
}
|
|
}
|