Skip to content

Commit

Permalink
remove not needed parameter from constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
sszafGCA committed Nov 15, 2023
1 parent adb77c9 commit 3f046f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ export class XApiKeyStrategy extends PassportStrategy(Strategy, 'api-key') {
private readonly allowedApiKeys: string[];

constructor(private readonly configService: ConfigService<IXApiKeyConfig, true>) {
super(
{ header: 'X-API-KEY', prefix: '' },
true,
// eslint-disable-next-line @typescript-eslint/require-await
async (apiKey: string, done: (error: Error | null, data: boolean | null) => void) => this.validate(apiKey, done)
);
super({ header: 'X-API-KEY', prefix: '' }, true);
this.allowedApiKeys = this.configService.get<string[]>('ADMIN_API__ALLOWED_API_KEYS');
}

Expand Down
3 changes: 0 additions & 3 deletions apps/server/src/modules/server/admin-api.server.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ const serverModules = [ConfigModule.forRoot(createConfigModuleOptions(serverConf
MikroOrmModule.forRoot({
...defaultMikroOrmOptions,
type: 'mongo',
// TODO add mongoose options as mongo options (see database.js)
clientUrl: DB_URL,
password: DB_PASSWORD,
user: DB_USERNAME,
entities: ALL_ENTITIES,

// debug: true, // use it for locally debugging of queries
}),
LoggerModule,
],
Expand Down

0 comments on commit 3f046f5

Please sign in to comment.