using FastEndpoints; using PyroFetes.DTO.DeliveryNote.Response; using PyroFetes.Repositories; namespace PyroFetes.Endpoints.DeliveryNotes; public class GetAllDeliveryNoteEndpoint(DeliveryNotesRepository deliveryNotesRepository) : EndpointWithoutRequest> { public override void Configure() { Get("/deliveryNotes"); AllowAnonymous(); } public override async Task HandleAsync(CancellationToken ct) { await Send.OkAsync(await deliveryNotesRepository.ProjectToListAsync(ct), ct); } }