(Internal refactor) Decouple world info editor from global WI selector

This commit is contained in:
Cohee
2023-06-20 13:47:34 +03:00
parent 3b66310dd2
commit 2663a8370f
4 changed files with 95 additions and 107 deletions

View File

@ -2154,7 +2154,7 @@ app.post('/editworldinfo', jsonParser, (request, response) => {
const filename = `${request.body.name}.json`;
const pathToFile = path.join(directories.worlds, filename);
fs.writeFileSync(pathToFile, JSON.stringify(request.body.data));
fs.writeFileSync(pathToFile, JSON.stringify(request.body.data, null, 4));
return response.send({ ok: true });
});