aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/serverLib
diff options
context:
space:
mode:
authormarzavec <admin@marzavec.com>2019-04-28 00:38:47 +0200
committerGitHub <noreply@github.com>2019-04-28 00:38:47 +0200
commit9a230deaf09d16c872d50b872190fcc546fae1c8 (patch)
tree36fb205079ba62fd47691dc96e50c8e7c74310f9 /server/src/serverLib
parentMerge pull request #62 from MinusGix/patch-2 (diff)
parentUpdate ConfigManager.js (diff)
downloadhackchat-9a230deaf09d16c872d50b872190fcc546fae1c8.tar.gz
hackchat-9a230deaf09d16c872d50b872190fcc546fae1c8.zip
Merge pull request #63 from MinusGix/patch-4
When saving Config, format it in a more human readable manner.
Diffstat (limited to 'server/src/serverLib')
-rw-r--r--server/src/serverLib/ConfigManager.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/serverLib/ConfigManager.js b/server/src/serverLib/ConfigManager.js
index 36af1ec..e29a0e7 100644
--- a/server/src/serverLib/ConfigManager.js
+++ b/server/src/serverLib/ConfigManager.js
@@ -62,7 +62,10 @@ class ConfigManager {
const backupPath = await this.backup();
try {
- fse.writeJSONSync(this.configPath, this.config);
+ fse.writeJSONSync(this.configPath, this.config, {
+ // Indent with two spaces
+ spaces: 2,
+ });
fse.removeSync(backupPath);
return true;