| 12345678910111213141516171819202122232425262728293031 |
- using System.Security.Claims;
- using Web.Api.Common;
- using Web.Api.Extensions;
- using MediatR;
- namespace Web.Api.Endpoints.Store;
- /// <summary>상점 — 내 보관함 그룹 목록 (ProductID 단위).</summary>
- 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();
- }
- }
|