fix: feedback
This commit is contained in:
@@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user