| 123456789101112131415161718192021222324252627 |
- using Web.Api.Common;
- using Web.Api.Extensions;
- using Application.Abstractions.Messaging;
- namespace Web.Api.Endpoints.Store;
- /// <summary>게임 상세 (Steam 스타일 페이지용) — 장르/카테고리/예고편/사양/이미지/무작위 상품 8개.</summary>
- internal sealed class GamesDetail : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/store/games/{id:int}", async (
- int id,
- ISender sender,
- CancellationToken ct
- ) => {
- var result = await sender.Send(new Application.Features.Api.Store.Games.Detail.Query(id), ct);
- return result.Match(
- () => ApiResponse.Ok(result.Value),
- CustomResults.Problem
- );
- })
- .WithTags("Store")
- .AllowAnonymous();
- }
- }
|