Skip to content

Commit

Permalink
fix: linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pratapalakshmi committed Dec 15, 2024
1 parent 399665b commit 23c98d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions services/workflows-service/src/auth/local/local-auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ export class LocalAuthGuard extends AuthGuard('local') implements CanActivate {
async canActivate(context: ExecutionContext): Promise<boolean> {
const result = super.canActivate(context) as boolean;
const request = context.switchToHttp().getRequest();

if (result && request.user) {
const fullUrl = request.protocol + '://' + request.get('host') + request.originalUrl;
this.supabaseService.logSignIn(fullUrl);
}

super.logIn(request);

return Promise.resolve(result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export class SupabaseService implements ISupabaseService {
const telemetryEnabled = this.configService.get('TELEMETRY_ENABLED');
const supabaseUrl = this.configService.get<string>('TELEMETRY_SUPABASE_URL');
const supabaseApiKey = this.configService.get<string>('TELEMETRY_SUPABASE_API_KEY');

if (telemetryEnabled) {
if (!supabaseUrl || !supabaseApiKey) {
throw new Error('Supabase URL or API key is missing in configuration');
Expand Down

0 comments on commit 23c98d8

Please sign in to comment.