mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 14:02:39 +00:00
fix modules interactions
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
AD_REPOSITORY,
|
||||
AD_DIRECTION_ENCODER,
|
||||
AD_ROUTE_PROVIDER,
|
||||
AD_GET_BASIC_ROUTE_CONTROLLER,
|
||||
} from './ad.di-tokens';
|
||||
import { MessageBrokerPublisher } from '@mobicoop/message-broker-module';
|
||||
import { AdRepository } from './infrastructure/ad.repository';
|
||||
@@ -12,7 +13,9 @@ import { PrismaService } from './infrastructure/prisma.service';
|
||||
import { AdMapper } from './ad.mapper';
|
||||
import { AdCreatedMessageHandler } from './interface/message-handlers/ad-created.message-handler';
|
||||
import { PostgresDirectionEncoder } from '@modules/geography/infrastructure/postgres-direction-encoder';
|
||||
import { GetRouteController } from '@modules/geography/interface/controllers/get-route.controller';
|
||||
import { GetBasicRouteController } from '@modules/geography/interface/controllers/get-basic-route.controller';
|
||||
import { RouteProvider } from './infrastructure/route-provider';
|
||||
import { GeographyModule } from '@modules/geography/geography.module';
|
||||
|
||||
const messageHandlers = [AdCreatedMessageHandler];
|
||||
|
||||
@@ -41,12 +44,16 @@ const adapters: Provider[] = [
|
||||
},
|
||||
{
|
||||
provide: AD_ROUTE_PROVIDER,
|
||||
useClass: GetRouteController,
|
||||
useClass: RouteProvider,
|
||||
},
|
||||
{
|
||||
provide: AD_GET_BASIC_ROUTE_CONTROLLER,
|
||||
useClass: GetBasicRouteController,
|
||||
},
|
||||
];
|
||||
|
||||
@Module({
|
||||
imports: [CqrsModule],
|
||||
imports: [CqrsModule, GeographyModule],
|
||||
providers: [
|
||||
...messageHandlers,
|
||||
...mappers,
|
||||
|
||||
Reference in New Issue
Block a user