extract carpool informations from geography module

This commit is contained in:
sbriat
2023-09-07 14:30:07 +02:00
parent 57fe8d417f
commit d1a314f011
28 changed files with 586 additions and 611 deletions

View File

@@ -16,17 +16,11 @@ export class RouteMapper
{
toResponse = (entity: RouteEntity): RouteResponseDto => {
const response = new RouteResponseDto();
response.driverDistance = entity.getProps().driverDistance
? Math.round(entity.getProps().driverDistance as number)
response.distance = entity.getProps().distance
? Math.round(entity.getProps().distance as number)
: undefined;
response.driverDuration = entity.getProps().driverDuration
? Math.round(entity.getProps().driverDuration as number)
: undefined;
response.passengerDistance = entity.getProps().passengerDistance
? Math.round(entity.getProps().passengerDistance as number)
: undefined;
response.passengerDuration = entity.getProps().passengerDuration
? Math.round(entity.getProps().passengerDuration as number)
response.duration = entity.getProps().duration
? Math.round(entity.getProps().duration as number)
: undefined;
response.fwdAzimuth = Math.round(entity.getProps().fwdAzimuth);
response.backAzimuth = Math.round(entity.getProps().backAzimuth);