fix(server): enable/disable password login on truenas (#6433)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { SystemConfigService } from '@app/domain';
|
||||
import axios from 'axios';
|
||||
import { Command, CommandRunner } from 'nest-commander';
|
||||
|
||||
@Command({
|
||||
@@ -15,7 +14,6 @@ export class EnablePasswordLoginCommand extends CommandRunner {
|
||||
const config = await this.configService.getConfig();
|
||||
config.passwordLogin.enabled = true;
|
||||
await this.configService.updateConfig(config);
|
||||
await axios.post('http://localhost:3001/api/refresh-config');
|
||||
console.log('Password login has been enabled.');
|
||||
}
|
||||
}
|
||||
@@ -33,7 +31,6 @@ export class DisablePasswordLoginCommand extends CommandRunner {
|
||||
const config = await this.configService.getConfig();
|
||||
config.passwordLogin.enabled = false;
|
||||
await this.configService.updateConfig(config);
|
||||
await axios.post('http://localhost:3001/api/refresh-config');
|
||||
console.log('Password login has been disabled.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user