End of the day

This commit is contained in:
Cristiano
2025-11-06 17:51:00 +01:00
parent 76e48493f4
commit 0db72739aa
6 changed files with 24 additions and 22 deletions
@@ -10,7 +10,9 @@ public class GetDelivererRequest
public int DelivererId { get; set; }
}
public class GetDelivererEndpoint(PyroFetesDbContext database) : Endpoint<GetDelivererRequest, GetDelivererDto>
public class GetDelivererEndpoint(
PyroFetesDbContext database,
AutoMapper.IMapper mapper) : Endpoint<GetDelivererRequest, GetDelivererDto>
{
public override void Configure()
{
@@ -29,11 +31,7 @@ public class GetDelivererEndpoint(PyroFetesDbContext database) : Endpoint<GetDel
return;
}
await Send.OkAsync(new GetDelivererDto()
{
Id = deliverer.Id,
Transporter = deliverer.Transporter,
}, ct);
await Send.OkAsync(mapper.Map<GetDelivererDto>(deliverer), ct);
}
}