using Web.Api.Common; using Web.Api.Extensions; using MediatR; namespace Web.Api.Endpoints.Channel; /// 채널 목록 internal sealed class List : IEndpoint { public void MapEndpoint(IEndpointRouteBuilder app) { /// 전체 채널 목록 조회 (온/오프라인, 시청자 수 포함. 사이드바/메인 페이지용) app.MapGet("api/channel/list", async (ISender sender, CancellationToken ct) => { var result = await sender.Send(new Application.Features.Api.Channel.List.Query(), ct); return result.Match( () => ApiResponse.Ok(result.Value), CustomResults.Problem ); }) .WithTags("Channel"); } }