make config.json readable

This commit is contained in:
Girish Ramakrishnan
2024-02-10 10:40:56 +01:00
parent 2bf711f1f7
commit 95be147eb4

View File

@@ -2857,7 +2857,7 @@ async function uploadFile(app, sourceFilePath, destFilePath) {
async function backupConfig(app) {
assert.strictEqual(typeof app, 'object');
if (!safe.fs.writeFileSync(path.join(paths.APPS_DATA_DIR, app.id + '/config.json'), JSON.stringify(app))) {
if (!safe.fs.writeFileSync(path.join(paths.APPS_DATA_DIR, app.id + '/config.json'), JSON.stringify(app, null, 4))) {
throw new BoxError(BoxError.FS_ERROR, 'Error creating config.json: ' + safe.error.message);
}