using Web.Api.Common; using Application.Abstractions.Messaging; namespace Web.Api.Endpoints.Store; /// 상점 — 상품 상세 (Frontend 사용자). internal sealed class ProductsGet : IEndpoint { public void MapEndpoint(IEndpointRouteBuilder app) { app.MapGet("api/store/products/{id:int}", async ( int id, ISender sender, CancellationToken ct ) => { var result = await sender.Send(new Application.Features.Api.Store.Products.Get.Query(id), ct); if (result.IsFailure) { return CustomResults.Problem(result); } return ApiResponse.Ok(result.Value); }) .WithTags("Store") .AllowAnonymous(); } }