mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix: exchange moduel regsiter
This commit is contained in:
@@ -3,16 +3,21 @@ import { TypeOrmModule } from "@nestjs/typeorm";
|
|||||||
|
|
||||||
import { ExchangeSetting } from "./entities/exchange-setting.entity";
|
import { ExchangeSetting } from "./entities/exchange-setting.entity";
|
||||||
import { ExchangeSettingsController } from "./exchange-settings.controller";
|
import { ExchangeSettingsController } from "./exchange-settings.controller";
|
||||||
|
import { registerExchangeModule } from "./exchange-module-options";
|
||||||
import { ExchangeSettingsService } from "./exchange-settings.service";
|
import { ExchangeSettingsService } from "./exchange-settings.service";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Global so the several `ExchangeModule.forRootAsync` registrations (bookings,
|
* Global so the several `ExchangeModule.forRootAsync` registrations (bookings,
|
||||||
* contracts, warehouses) can inject {@link ExchangeSettingsService} into their
|
* contracts, warehouses) can inject {@link ExchangeSettingsService} into their
|
||||||
* options factory without each importing this module.
|
* options factory without each importing this module.
|
||||||
|
*
|
||||||
|
* Also registers its own `ExchangeModule` so `ExchangeSettingsController` can
|
||||||
|
* report the live CBE feed status (`ExchangeService.getProviderStatus()`)
|
||||||
|
* alongside the DB-backed fallback rate.
|
||||||
*/
|
*/
|
||||||
@Global()
|
@Global()
|
||||||
@Module({
|
@Module({
|
||||||
imports: [TypeOrmModule.forFeature([ExchangeSetting])],
|
imports: [TypeOrmModule.forFeature([ExchangeSetting]), registerExchangeModule()],
|
||||||
controllers: [ExchangeSettingsController],
|
controllers: [ExchangeSettingsController],
|
||||||
providers: [ExchangeSettingsService],
|
providers: [ExchangeSettingsService],
|
||||||
exports: [ExchangeSettingsService],
|
exports: [ExchangeSettingsService],
|
||||||
|
|||||||
Reference in New Issue
Block a user