forked from Yara724/api
57 lines
1.8 KiB
TypeScript
57 lines
1.8 KiB
TypeScript
import { Module } from "@nestjs/common";
|
|
import { HttpModule } from "@nestjs/axios";
|
|
import { ConfigModule, ConfigService } from "@nestjs/config";
|
|
import { MongooseModule } from "@nestjs/mongoose";
|
|
import { createHttpModuleOptions } from "src/core/config/http-proxy.factory";
|
|
import {
|
|
LookupModel,
|
|
LookupSchema,
|
|
} from "src/lookups/entities/schema/lookup.schema";
|
|
import { UsersModule } from "src/users/users.module";
|
|
import { FanavaranAuditModule } from "./fanavaran-audit.module";
|
|
import { FanavaranAuthService } from "./fanavaran-auth.service";
|
|
import { FanavaranClientConfigService } from "./fanavaran-client-config.service";
|
|
import { FanavaranLocationService } from "./fanavaran-location.service";
|
|
import { FanavaranLookupService } from "./fanavaran-lookup.service";
|
|
import {
|
|
FanavaranAuthToken,
|
|
FanavaranAuthTokenSchema,
|
|
} from "./schema/fanavaran-auth-token.schema";
|
|
import {
|
|
FanavaranClientConfig,
|
|
FanavaranClientConfigSchema,
|
|
} from "./schema/fanavaran-client-config.schema";
|
|
|
|
@Module({
|
|
imports: [
|
|
HttpModule.registerAsync({
|
|
imports: [ConfigModule],
|
|
inject: [ConfigService],
|
|
useFactory: createHttpModuleOptions,
|
|
}),
|
|
MongooseModule.forFeature([
|
|
{ name: FanavaranAuthToken.name, schema: FanavaranAuthTokenSchema },
|
|
{
|
|
name: FanavaranClientConfig.name,
|
|
schema: FanavaranClientConfigSchema,
|
|
},
|
|
{ name: LookupModel.name, schema: LookupSchema },
|
|
]),
|
|
FanavaranAuditModule,
|
|
UsersModule,
|
|
],
|
|
providers: [
|
|
FanavaranClientConfigService,
|
|
FanavaranAuthService,
|
|
FanavaranLookupService,
|
|
FanavaranLocationService,
|
|
],
|
|
exports: [
|
|
FanavaranClientConfigService,
|
|
FanavaranAuthService,
|
|
FanavaranLookupService,
|
|
FanavaranLocationService,
|
|
],
|
|
})
|
|
export class FanavaranLookupModule {}
|