CrewSessionEnd.cs 692 B

1234567891011121314151617181920212223
  1. using Web.Api.Common;
  2. using MediatR;
  3. namespace Web.Api.Endpoints.Donation;
  4. /// <summary>크루 방송 종료</summary>
  5. internal sealed class CrewSessionEnd : IEndpoint
  6. {
  7. public void MapEndpoint(IEndpointRouteBuilder app)
  8. {
  9. /// 정산 처리(수수료 차감 → 지갑 입금) + Ended 전환 + 크루원에게 쪽지 발송
  10. app.MapPost("api/crew/session/end", async (
  11. Application.Features.Api.Crew.EndSession.Command body,
  12. ISender sender,
  13. CancellationToken ct
  14. ) => {
  15. await sender.Send(body, ct);
  16. return ApiResponse.Ok();
  17. })
  18. .WithTags("Crew")
  19. .RequireAuthorization();
  20. }
  21. }