use configuration package for georouter

This commit is contained in:
Sylvain Briat
2023-10-31 16:11:56 +01:00
parent c5bf6102e6
commit 8befcc3c80
17 changed files with 96 additions and 177 deletions

View File

@@ -3,10 +3,9 @@ import { CqrsModule } from '@nestjs/cqrs';
import {
DIRECTION_ENCODER,
GEODESIC,
GEOGRAPHY_CONFIGURATION_REPOSITORY,
GEOROUTER,
PARAMS_PROVIDER,
} from './geography.di-tokens';
import { DefaultParamsProvider } from './infrastructure/default-params-provider';
import { PostgresDirectionEncoder } from './infrastructure/postgres-direction-encoder';
import { GetBasicRouteController } from './interface/controllers/get-basic-route.controller';
import { RouteMapper } from './route.mapper';
@@ -15,6 +14,7 @@ import { GraphhopperGeorouter } from './infrastructure/graphhopper-georouter';
import { HttpModule } from '@nestjs/axios';
import { GetRouteQueryHandler } from './core/application/queries/get-route/get-route.query-handler';
import { GetDetailedRouteController } from './interface/controllers/get-detailed-route.controller';
import { ConfigurationRepository } from '@mobicoop/configuration-module';
const queryHandlers: Provider[] = [GetRouteQueryHandler];
@@ -22,8 +22,8 @@ const mappers: Provider[] = [RouteMapper];
const adapters: Provider[] = [
{
provide: PARAMS_PROVIDER,
useClass: DefaultParamsProvider,
provide: GEOGRAPHY_CONFIGURATION_REPOSITORY,
useClass: ConfigurationRepository,
},
{
provide: DIRECTION_ENCODER,