1
0
Fork 0
forked from svrjs/svrjs

Lint out svrpasswd.js script

This commit is contained in:
Dorian Niemiec 2024-08-26 07:38:42 +02:00
parent 34afacd0d2
commit 60b0ea6933

View file

@ -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);