fix: feedback

This commit is contained in:
Mir Arif Hasan
2023-12-19 17:10:36 +06:00
parent 629730a309
commit cb4b8a5876

View File

@@ -192,41 +192,28 @@ export class InfraConfigService implements OnModuleInit {
isServiceConfigured(service: AuthProvider) { isServiceConfigured(service: AuthProvider) {
switch (service) { switch (service) {
case AuthProvider.GOOGLE: case AuthProvider.GOOGLE:
if ( return (
!this.configService.get<string>('INFRA.GOOGLE_CLIENT_ID') || this.configService.get<string>('INFRA.GOOGLE_CLIENT_ID') &&
!this.configService.get<string>('INFRA.GOOGLE_CLIENT_SECRET') this.configService.get<string>('INFRA.GOOGLE_CLIENT_SECRET')
) { );
return false;
}
break;
case AuthProvider.GITHUB: case AuthProvider.GITHUB:
if ( return (
!this.configService.get<string>('INFRA.GITHUB_CLIENT_ID') || this.configService.get<string>('INFRA.GITHUB_CLIENT_ID') &&
!this.configService.get<string>('INFRA.GITHUB_CLIENT_SECRET') !this.configService.get<string>('INFRA.GITHUB_CLIENT_SECRET')
) { );
return false;
}
break;
case AuthProvider.MICROSOFT: case AuthProvider.MICROSOFT:
if ( return (
!this.configService.get<string>('INFRA.MICROSOFT_CLIENT_ID') || this.configService.get<string>('INFRA.MICROSOFT_CLIENT_ID') &&
!this.configService.get<string>('INFRA.MICROSOFT_CLIENT_SECRET') !this.configService.get<string>('INFRA.MICROSOFT_CLIENT_SECRET')
) { );
return false;
}
break;
case AuthProvider.EMAIL: case AuthProvider.EMAIL:
if ( return (
!this.configService.get<string>('INFRA.MAILER_SMTP_URL') || this.configService.get<string>('INFRA.MAILER_SMTP_URL') &&
!this.configService.get<string>('INFRA.MAILER_ADDRESS_FROM') this.configService.get<string>('INFRA.MAILER_ADDRESS_FROM')
) { );
default:
return false; return false;
} }
break;
default:
break;
}
return true;
} }
/** /**