feat: fix header strategy

This commit is contained in:
Eli Bosley
2024-10-25 23:48:16 -04:00
parent b9b8bbe871
commit 20771f61a8
2 changed files with 3 additions and 4 deletions

View File

@@ -72,5 +72,6 @@ export const executeRemoteGraphQLQuery = async (
remoteQueryLogger.warn('Could not respond %o', error);
}
remoteQueryLogger.error('Error executing remote query %s', err instanceof Error ? err.message: 'Unknown Error');
remoteQueryLogger.trace(err);
}
};

View File

@@ -1,6 +1,6 @@
import { PassportStrategy } from '@nestjs/passport';
import { Strategy } from 'passport-http-header-strategy';
import { Injectable, Logger } from '@nestjs/common';
import { Inject, Injectable, Logger } from '@nestjs/common';
import { AuthService } from './auth.service';
@Injectable()
@@ -8,9 +8,7 @@ export class ServerHeaderStrategy extends PassportStrategy(Strategy, 'server-htt
static key = 'server-http-header';
private readonly logger = new Logger(ServerHeaderStrategy.name);
constructor(
private readonly authService: AuthService,
) {
constructor(@Inject(AuthService) private readonly authService: AuthService) {
super({ header: 'x-api-key', passReqToCallback: false });
}