Use tabs when saving user configs
This commit is contained in:
parent
e8cc465228
commit
779aed7cd6
@ -84,7 +84,7 @@ ClientManager.prototype.addUser = function(name, password) {
|
|||||||
};
|
};
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
Helper.getUserConfigPath(name),
|
Helper.getUserConfigPath(name),
|
||||||
JSON.stringify(user, null, " ")
|
JSON.stringify(user, null, "\t")
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error("Failed to add user " + name, e);
|
log.error("Failed to add user " + name, e);
|
||||||
@ -108,7 +108,7 @@ ClientManager.prototype.updateUser = function(name, opts) {
|
|||||||
_.assign(user, opts);
|
_.assign(user, opts);
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
Helper.getUserConfigPath(name),
|
Helper.getUserConfigPath(name),
|
||||||
JSON.stringify(user, null, " ")
|
JSON.stringify(user, null, "\t")
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error("Failed to update user", e);
|
log.error("Failed to update user", e);
|
||||||
|
@ -26,7 +26,7 @@ program
|
|||||||
user.token = null; // Will be regenerated when the user is loaded
|
user.token = null; // Will be regenerated when the user is loaded
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
file,
|
file,
|
||||||
JSON.stringify(user, null, " ")
|
JSON.stringify(user, null, "\t")
|
||||||
);
|
);
|
||||||
log.info("Successfully reset password for '" + name + "'.");
|
log.info("Successfully reset password for '" + name + "'.");
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user