GamesList.cs 631 B

123456789101112131415161718192021
  1. using Web.Api.Common;
  2. using Application.Abstractions.Messaging;
  3. namespace Web.Api.Endpoints.Store;
  4. /// <summary>상점 — 게임 필터 드롭다운용 활성 게임 목록.</summary>
  5. internal sealed class GamesList : IEndpoint
  6. {
  7. public void MapEndpoint(IEndpointRouteBuilder app)
  8. {
  9. app.MapGet("api/store/games", async (
  10. ISender sender,
  11. CancellationToken ct
  12. ) => {
  13. var data = await sender.Send(new Application.Features.Api.Store.Games.List.Query(), ct);
  14. return ApiResponse.Ok(data);
  15. })
  16. .WithTags("Store")
  17. .AllowAnonymous();
  18. }
  19. }