mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 02:12:41 +00:00
28 lines
756 B
TypeScript
28 lines
756 B
TypeScript
import { Module, Provider } from '@nestjs/common';
|
|
import { CqrsModule } from '@nestjs/cqrs';
|
|
import {
|
|
DIRECTION_ENCODER,
|
|
GEOGRAPHY_CONFIGURATION_REPOSITORY,
|
|
} from './geography.di-tokens';
|
|
import { PostgresDirectionEncoder } from './infrastructure/postgres-direction-encoder';
|
|
import { HttpModule } from '@nestjs/axios';
|
|
import { ConfigurationRepository } from '@mobicoop/configuration-module';
|
|
|
|
const adapters: Provider[] = [
|
|
{
|
|
provide: GEOGRAPHY_CONFIGURATION_REPOSITORY,
|
|
useClass: ConfigurationRepository,
|
|
},
|
|
{
|
|
provide: DIRECTION_ENCODER,
|
|
useClass: PostgresDirectionEncoder,
|
|
},
|
|
];
|
|
|
|
@Module({
|
|
imports: [CqrsModule, HttpModule],
|
|
providers: [...adapters],
|
|
exports: [DIRECTION_ENCODER],
|
|
})
|
|
export class GeographyModule {}
|