refactor: config caching (#10168)

This commit is contained in:
Jason Rasmussen
2024-06-12 07:07:35 -04:00
committed by GitHub
parent 5dda5d93f5
commit e84657192c
20 changed files with 54 additions and 54 deletions

View File

@@ -42,25 +42,25 @@ export class CliService {
}
async disablePasswordLogin(): Promise<void> {
const config = await this.configCore.getConfig();
const config = await this.configCore.getConfig({ withCache: false });
config.passwordLogin.enabled = false;
await this.configCore.updateConfig(config);
}
async enablePasswordLogin(): Promise<void> {
const config = await this.configCore.getConfig();
const config = await this.configCore.getConfig({ withCache: false });
config.passwordLogin.enabled = true;
await this.configCore.updateConfig(config);
}
async disableOAuthLogin(): Promise<void> {
const config = await this.configCore.getConfig();
const config = await this.configCore.getConfig({ withCache: false });
config.oauth.enabled = false;
await this.configCore.updateConfig(config);
}
async enableOAuthLogin(): Promise<void> {
const config = await this.configCore.getConfig();
const config = await this.configCore.getConfig({ withCache: false });
config.oauth.enabled = true;
await this.configCore.updateConfig(config);
}