Add indentation in json configuration file generated by the admin
authorChocobozzz <me@florianbigard.com>
Wed, 28 Feb 2018 08:55:00 +0000 (09:55 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 28 Feb 2018 08:55:00 +0000 (09:55 +0100)
interface

server/controllers/api/config.ts

index 47b91cd94bf04459dcd8b3bf7829e228a1bbbd38..7ef0c19e3943462a1b718c2800de8e7688cd5995 100644 (file)
@@ -116,7 +116,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
   toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
   delete toUpdate.user.videoQuota
 
-  await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON))
+  await writeFilePromise(CONFIG.CUSTOM_FILE, JSON.stringify(toUpdateJSON, undefined, 2))
 
   reloadConfig()