RemoteResend.cs 729 B

123456789101112131415161718192021222324
  1. using Web.Api.Common;
  2. using MediatR;
  3. namespace Web.Api.Endpoints.Donation;
  4. /// <summary>리모콘 — 재전송</summary>
  5. internal sealed class RemoteResend : IEndpoint
  6. {
  7. public void MapEndpoint(IEndpointRouteBuilder app)
  8. {
  9. /// 실패/무시된 알림을 대기열 맨 뒤에 재추가 (Queued로 초기화)
  10. app.MapPost("api/donation/remote/resend/{alertID}", async (
  11. int alertID,
  12. ISender sender,
  13. CancellationToken ct
  14. ) => {
  15. await sender.Send(new Application.Features.Api.DonationRemote.ResendAlert.Command(alertID), ct);
  16. return ApiResponse.Ok();
  17. })
  18. .WithTags("DonationRemote")
  19. .RequireAuthorization();
  20. }
  21. }