using System.Security.Claims; using Web.Api.Common; using Web.Api.Extensions; using Application.Abstractions.Messaging; namespace Web.Api.Endpoints.Store; /// 상점 — 내 보관함 그룹 목록 (ProductID 단위). internal sealed class InventoryGroups : IEndpoint { public void MapEndpoint(IEndpointRouteBuilder app) { app.MapGet("api/store/inventory/groups", async ( int? page, ushort? perPage, ClaimsPrincipal user, ISender sender, CancellationToken ct ) => { var memberID = user.GetRequiredMemberID(); var data = await sender.Send(new Application.Features.Api.Store.Inventory.Groups.Query( memberID, page is > 0 ? page.Value : 1, perPage is > 0 ? perPage.Value : (ushort)24 ), ct); return ApiResponse.Ok(data); }) .WithTags("Store") .RequireAuthorization(); } }