using MediatR; using Web.Api.Common; namespace Web.Api.Endpoints.Crypto; internal sealed class CryptoMarkets : IEndpoint { public void MapEndpoint(IEndpointRouteBuilder app) { app.MapGet("api/crypto/markets", async ( ISender sender, CancellationToken ct ) => { return ApiResponse.Ok( await sender.Send(new Application.Features.Api.Crypto.Market.GetAll.Query(), ct) ); }) .WithTags("Crypto") .AllowAnonymous(); } }