diff --git a/apps/edr-freight-api/src/modules/last-mile/last-mile.module.ts b/apps/edr-freight-api/src/modules/last-mile/last-mile.module.ts index 32c2de721..e4b99a18c 100644 --- a/apps/edr-freight-api/src/modules/last-mile/last-mile.module.ts +++ b/apps/edr-freight-api/src/modules/last-mile/last-mile.module.ts @@ -1,4 +1,4 @@ -import { Module } from '@nestjs/common'; +import { Module, forwardRef } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { BookingsModule } from '../bookings/bookings.module'; @@ -13,7 +13,7 @@ import { LastMileService } from './last-mile.service'; @Module({ imports: [ TypeOrmModule.forFeature([LastMile]), - BookingsModule, + forwardRef(() => BookingsModule), VehiclesModule, DriversModule, NotificationsModule, diff --git a/apps/edr-freight-api/src/modules/train-scheduling/train-scheduling.module.ts b/apps/edr-freight-api/src/modules/train-scheduling/train-scheduling.module.ts index 6ed9b8ed5..2ed5eaa42 100644 --- a/apps/edr-freight-api/src/modules/train-scheduling/train-scheduling.module.ts +++ b/apps/edr-freight-api/src/modules/train-scheduling/train-scheduling.module.ts @@ -45,7 +45,7 @@ import { NotificationsModule } from '../notifications/notifications.module'; WagonTypesModule, TrainSetsModule, TrainSchedulesModule, - WarehousesModule, + forwardRef(() => WarehousesModule), RuleEngineModule, ], controllers: [TrainSchedulingController], diff --git a/apps/edr-freight-api/src/modules/warehouses/warehouses.module.ts b/apps/edr-freight-api/src/modules/warehouses/warehouses.module.ts index 98c6f0222..2a77fef74 100644 --- a/apps/edr-freight-api/src/modules/warehouses/warehouses.module.ts +++ b/apps/edr-freight-api/src/modules/warehouses/warehouses.module.ts @@ -1,4 +1,4 @@ -import { Module } from '@nestjs/common'; +import { Module, forwardRef } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { ExchangeModule, ExchangeOptions } from '@edr/api-common'; import { TypeOrmModule } from '@nestjs/typeorm'; @@ -70,7 +70,7 @@ import { WarehousesService } from './warehouses.service'; ]), FilesModule, InterchangeDocumentsModule, - LastMileModule, + forwardRef(() => LastMileModule), ExchangeModule.forRootAsync({ inject: [ConfigService], useFactory: (config: ConfigService): ExchangeOptions =>