forked from svrjs/svrjs
Lint out svrpasswd.js script
This commit is contained in:
parent
34afacd0d2
commit
60b0ea6933
1 changed files with 3 additions and 1 deletions
|
@ -275,7 +275,9 @@ if (configJSON.users != undefined) users = configJSON.users;
|
|||
function saveConfig() {
|
||||
let configJSONobj = {};
|
||||
if (fs.existsSync(__dirname + "/config.json"))
|
||||
configJSONobj = JSON.parse(fs.readFileSync(__dirname + "/config.json").toString());
|
||||
configJSONobj = JSON.parse(
|
||||
fs.readFileSync(__dirname + "/config.json").toString(),
|
||||
);
|
||||
configJSONobj.users = users;
|
||||
const configString = JSON.stringify(configJSONobj, null, 2);
|
||||
fs.writeFileSync(__dirname + "/config.json", configString);
|
||||
|
|
Reference in a new issue