using Web.Api.Common; using Web.Api.Extensions; using Application.Abstractions.Messaging; namespace Web.Api.Endpoints.Store; /// 게임 페이지 — 활성 게임 목록 (검색·정렬). internal sealed class GamesBrowse : IEndpoint { public void MapEndpoint(IEndpointRouteBuilder app) { app.MapGet("api/store/games/list", async ( ISender sender, CancellationToken ct, string? keyword = null, string? sort = null ) => { var result = await sender.Send(new Application.Features.Api.Store.Games.Browse.Query(keyword, sort), ct); return result.Match( () => ApiResponse.Ok(result.Value), CustomResults.Problem ); }) .WithTags("Store") .AllowAnonymous(); } }