Improved & fixed some issues with JWT authentication.

This commit is contained in:
Tom
2025-02-12 17:21:48 +00:00
parent d907f425dc
commit a0909bfd21
14 changed files with 140 additions and 85 deletions

View File

@@ -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,