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