| 123456789101112131415161718192021222324 |
- using Application.Abstractions.Messaging;
- using Web.Api.Common;
- namespace Web.Api.Endpoints.Paper;
- /// <summary>모의투자 리더보드 — 수익률/승률/MDD × 주/월/전체 (익명 허용).</summary>
- internal sealed class GetLeaderboard : IEndpoint
- {
- public void MapEndpoint(IEndpointRouteBuilder app)
- {
- app.MapGet("api/paper/leaderboard", async (
- string? sort,
- string? period,
- int? page,
- ISender sender,
- CancellationToken ct
- ) => {
- var data = await sender.Send(new Application.Features.Api.Paper.GetLeaderboard.Query(sort, period, page ?? 1), ct);
- return ApiResponse.Ok(data);
- })
- .WithTags("Paper")
- .AllowAnonymous();
- }
- }
|