CrewSessionConsent.cs 707 B

1234567891011121314151617181920212223
  1. using Web.Api.Common;
  2. using MediatR;
  3. namespace Web.Api.Endpoints.Donation;
  4. /// <summary>크루원 참여 동의</summary>
  5. internal sealed class CrewSessionConsent : IEndpoint
  6. {
  7. public void MapEndpoint(IEndpointRouteBuilder app)
  8. {
  9. /// 크루원 동의 체크. 전원 동의 시 Ready 전환 + AppHub 실시간 현황
  10. app.MapPost("api/crew/session/consent", async (
  11. Application.Features.Api.Crew.ConsentSession.Command body,
  12. ISender sender,
  13. CancellationToken ct
  14. ) => {
  15. var data = await sender.Send(body, ct);
  16. return ApiResponse.Ok(data);
  17. })
  18. .WithTags("Crew")
  19. .RequireAuthorization();
  20. }
  21. }