| 1234567891011121314151617181920212223242526 |
- using Web.Api.Common;
- using Web.Api.Extensions;
- using MediatR;
- namespace Web.Api.Endpoints.Studio.Crew;
- /// <summary>크루 초대 코드 생성</summary>
- internal sealed class CrewInviteCode : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapPost("api/studio/crew/invite/generate", async (
- Application.Features.Api.Crew.GenerateInviteCode.Command body,
- ISender sender,
- CancellationToken ct
- ) => {
- var result = await sender.Send(body, ct);
- return result.Match(
- data => ApiResponse.Ok(data),
- CustomResults.Problem
- );
- })
- .WithTags("StudioCrew")
- .RequireAuthorization();
- }
- }
|