From add742fd61e3312472c509528075d4d4c2de23fa Mon Sep 17 00:00:00 2001 From: Yancey Leo Date: Fri, 31 Jan 2020 23:09:26 +0800 Subject: [PATCH] feat: update EnvConfig's types --- env/test.env | 2 +- src/config/config.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/env/test.env b/env/test.env index a92b96f8..45bde060 100644 --- a/env/test.env +++ b/env/test.env @@ -18,4 +18,4 @@ ALI_SMS_SIGN_NAME=ALI_SMS_SIGN_NAME_TEST ALI_SMS_TEMPLATE_CODE=ALI_SMS_TEMPLATE_CODE_TEST JWT_SECRET_KEY=JWT_SECRET_KEY_TEST -JWT_EXPIRES_TIME=3 * 24 * 60 * 60 \ No newline at end of file +JWT_EXPIRES_TIME=60 \ No newline at end of file diff --git a/src/config/config.service.ts b/src/config/config.service.ts index eebcbad8..231c8dfc 100644 --- a/src/config/config.service.ts +++ b/src/config/config.service.ts @@ -4,7 +4,7 @@ import fs from 'fs' import { AliOSSKey, AliSMSKey, AliKey } from './interfaces/ali-keys.interface' import { BandwagonKey } from './interfaces/bandwagon-keys.interface' -export type EnvConfig = Record +export type EnvConfig = Record export class ConfigService { public readonly isEnvProduction: boolean @@ -105,7 +105,7 @@ export class ConfigService { return validatedEnvConfig } - private get(key: string): string { + private get(key: string) { return this.envConfig[key] } }