Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Commit

Permalink
feat: update EnvConfig's types
Browse files Browse the repository at this point in the history
  • Loading branch information
YanceyOfficial committed Jan 31, 2020
1 parent b62fff7 commit add742f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion env/test.env
Original file line number Diff line number Diff line change
Expand Up @@ -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
JWT_EXPIRES_TIME=60
4 changes: 2 additions & 2 deletions src/config/config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>
export type EnvConfig = Record<string, any>

export class ConfigService {
public readonly isEnvProduction: boolean
Expand Down Expand Up @@ -105,7 +105,7 @@ export class ConfigService {
return validatedEnvConfig
}

private get(key: string): string {
private get(key: string) {
return this.envConfig[key]
}
}

0 comments on commit add742f

Please sign in to comment.