fix: read data from DB for latest value (#4623)

HSB-515
This commit is contained in:
Mir Arif Hasan 2024-12-18 23:23:09 +06:00 committed by GitHub
parent 1cf5d23118
commit 8aa816c38e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -371,10 +371,10 @@ export class InfraConfigService implements OnModuleInit {
* @returns Either true or an error
*/
async enableAndDisableSSO(providerInfo: EnableAndDisableSSOArgs[]) {
const allowedAuthProviders = this.configService
.get<string>('INFRA.VITE_ALLOWED_AUTH_PROVIDERS')
.split(',');
const infra = await this.get(InfraConfigEnum.VITE_ALLOWED_AUTH_PROVIDERS);
if (E.isLeft(infra)) return E.left(infra.left);
const allowedAuthProviders = infra.right.value.split(',');
let updatedAuthProviders = allowedAuthProviders;
const infraConfigMap = await this.getInfraConfigsMap();