using Web.Api.Common; using Web.Api.Extensions; using Application.Abstractions.Messaging; namespace Web.Api.Endpoints.Channel; /// 크리에이터(채널) 목록 — 크리에이터 탐색 페이지용 (검색·정렬·무작위는 프론트에서 처리) internal sealed class Creators : IEndpoint { public void MapEndpoint(IEndpointRouteBuilder app) { app.MapGet("api/channel/creators", async (ISender sender, CancellationToken ct) => { var result = await sender.Send(new Application.Features.Api.Channel.GetCreators.Query(), ct); return result.Match( () => ApiResponse.Ok(result.Value), CustomResults.Problem ); }) .WithTags("Channel") .AllowAnonymous() .RequireFeature(c => c.Channel); } }