WorldIndices.cs 713 B

12345678910111213141516171819202122
  1. using Application.Abstractions.Messaging;
  2. using Web.Api.Common;
  3. namespace Web.Api.Endpoints.Market;
  4. /// <summary>세계 주요국 증시지수 — 국내(코스피) + 해외 스냅샷 병합. 메인 세계지도 핀 (익명 열람).</summary>
  5. internal sealed class WorldIndices : IEndpoint
  6. {
  7. public void MapEndpoint(IEndpointRouteBuilder app)
  8. {
  9. app.MapGet("api/market/world-indices", async (
  10. ISender sender,
  11. CancellationToken ct
  12. ) => {
  13. var result = await sender.Send(new Application.Features.Api.Stocks.GetWorldIndices.Query(), ct);
  14. return ApiResponse.Ok(result);
  15. })
  16. .WithTags("Market")
  17. .AllowAnonymous();
  18. }
  19. }