RemoteSkip.cs 736 B

123456789101112131415161718192021222324
  1. using Web.Api.Common;
  2. using MediatR;
  3. namespace Web.Api.Endpoints.Donation;
  4. /// <summary>리모콘 — 건너뛰기</summary>
  5. internal sealed class RemoteSkip : IEndpoint
  6. {
  7. public void MapEndpoint(IEndpointRouteBuilder app)
  8. {
  9. /// 현재 재생 중인 알림 즉시 종료 → 다음 알림으로 넘김
  10. app.MapPost("api/donation/remote/skip/{widgetToken}", async (
  11. string widgetToken,
  12. ISender sender,
  13. CancellationToken ct
  14. ) => {
  15. await sender.Send(new Application.Features.Api.DonationRemote.SkipCurrent.Command(widgetToken), ct);
  16. return ApiResponse.Ok();
  17. })
  18. .WithTags("DonationRemote")
  19. .RequireAuthorization();
  20. }
  21. }