Improved & fixed some issues with JWT authentication.
This commit is contained in:
@@ -12,11 +12,11 @@ export class DatabaseOptions implements TypeOrmOptionsFactory {
|
||||
createTypeOrmOptions(): TypeOrmModuleOptions | Promise<TypeOrmModuleOptions> {
|
||||
return {
|
||||
type: "postgres",
|
||||
host: this.config.getOrThrow('DATABASE_HOST'),
|
||||
port: parseInt(this.config.getOrThrow('DATABASE_PORT'), 10),
|
||||
username: this.config.getOrThrow('DATABASE_USERNAME'),
|
||||
password: this.config.getOrThrow('DATABASE_PASSWORD'),
|
||||
database: this.config.getOrThrow('DATABASE_NAME'),
|
||||
host: this.config.getOrThrow<string>('DATABASE_HOST'),
|
||||
port: parseInt(this.config.getOrThrow<string>('DATABASE_PORT'), 10),
|
||||
username: this.config.getOrThrow<string>('DATABASE_USERNAME'),
|
||||
password: this.config.getOrThrow<string>('DATABASE_PASSWORD'),
|
||||
database: this.config.getOrThrow<string>('DATABASE_NAME'),
|
||||
|
||||
entities: [__dirname + '/../**/*.entity.js'],
|
||||
logging: true,
|
||||
|
||||
Reference in New Issue
Block a user