| 1234567891011121314151617181920212223242526272829303132 |
- using Web.Api.Common;
- using Web.Api.Extensions;
- using MediatR;
- namespace Web.Api.Endpoints.Donation;
- /// <summary>채널의 시그니처 이미지 목록 (이미지 있는 Alert 설정만, 페이징)</summary>
- internal sealed class Signatures : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- /// identifier: @handle 또는 YouTube Channel ID (SID)
- app.MapGet("api/donation/signatures/{identifier}", async (
- string identifier,
- int? page,
- int? perPage,
- ISender sender,
- CancellationToken ct
- ) => {
- var query = new Application.Features.Api.DonationAlert.GetSignatureImages.Query(
- identifier,
- page ?? 1,
- perPage ?? 6
- );
- var data = await sender.Send(query, ct);
- return ApiResponse.Ok(data);
- })
- .WithTags("Donation")
- .AllowAnonymous();
- }
- }
|