simpler route provider in ad module

This commit is contained in:
sbriat
2023-09-08 16:19:25 +02:00
parent 6b4ac1792c
commit 59a2644bb4
25 changed files with 436 additions and 568 deletions

View File

@@ -16,12 +16,8 @@ export class RouteMapper
{
toResponse = (entity: RouteEntity): RouteResponseDto => {
const response = new RouteResponseDto();
response.distance = entity.getProps().distance
? Math.round(entity.getProps().distance as number)
: undefined;
response.duration = entity.getProps().duration
? Math.round(entity.getProps().duration as number)
: undefined;
response.distance = Math.round(entity.getProps().distance);
response.duration = Math.round(entity.getProps().duration);
response.fwdAzimuth = Math.round(entity.getProps().fwdAzimuth);
response.backAzimuth = Math.round(entity.getProps().backAzimuth);
response.distanceAzimuth = Math.round(entity.getProps().distanceAzimuth);