Browse Source

Clean up

pull/4682/head
Thomas Kaul 4 months ago
parent
commit
5fd20ea623
  1. 6
      apps/api/src/app/auth/api-key.strategy.ts

6
apps/api/src/app/auth/api-key.strategy.ts

@ -24,8 +24,7 @@ export class ApiKeyStrategy extends PassportStrategy(
super({ header: HEADER_KEY_TOKEN, prefix: 'Api-Key ' }, false); super({ header: HEADER_KEY_TOKEN, prefix: 'Api-Key ' }, false);
} }
public async validate(apiKey: string): Promise<any> { public async validate(apiKey: string) {
try {
const user = await this.validateApiKey(apiKey); const user = await this.validateApiKey(apiKey);
if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) { if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) {
@ -47,9 +46,6 @@ export class ApiKeyStrategy extends PassportStrategy(
} }
return user; return user;
} catch (error) {
throw error;
}
} }
private async validateApiKey(apiKey: string) { private async validateApiKey(apiKey: string) {

Loading…
Cancel
Save