matcher/old/modules/ad/adapters/secondaries/default-params.provider.ts

18 lines
650 B
TypeScript
Raw Normal View History

2023-05-11 15:47:55 +00:00
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
2023-05-12 14:23:42 +00:00
import { DefaultParams } from '../../domain/types/default-params.type';
import { IProvideParams } from '../../domain/interfaces/params-provider.interface';
2023-05-11 15:47:55 +00:00
@Injectable()
2023-05-12 14:23:42 +00:00
export class DefaultParamsProvider implements IProvideParams {
2023-05-11 15:47:55 +00:00
constructor(private readonly configService: ConfigService) {}
2023-05-12 14:23:42 +00:00
getParams = (): DefaultParams => {
2023-05-11 15:47:55 +00:00
return {
DEFAULT_TIMEZONE: this.configService.get('DEFAULT_TIMEZONE'),
GEOROUTER_TYPE: this.configService.get('GEOROUTER_TYPE'),
GEOROUTER_URL: this.configService.get('GEOROUTER_URL'),
};
};
}