mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
settings.json finally getss linebreaks
This commit is contained in:
15
server.js
15
server.js
@@ -1271,8 +1271,19 @@ app.post("/downloadbackground", urlencodedParser, function (request, response) {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
app.post("/savesettings", jsonParser, function (request, response) {
|
||||
fs.writeFile('public/settings.json', JSON.stringify(request.body), 'utf8', function (err) {
|
||||
fs.writeFile('public/settings.json', JSON.stringify(request.body, null, 4), 'utf8', function (err) {
|
||||
if (err) {
|
||||
response.send(err);
|
||||
console.log(err);
|
||||
} else {
|
||||
response.send({ result: "ok" });
|
||||
}
|
||||
});
|
||||
|
||||
/*fs.writeFile('public/settings.json', JSON.stringify(request.body), 'utf8', function (err) {
|
||||
if (err) {
|
||||
response.send(err);
|
||||
return console.log(err);
|
||||
@@ -1281,7 +1292,7 @@ app.post("/savesettings", jsonParser, function (request, response) {
|
||||
//response.redirect("/");
|
||||
response.send({ result: "ok" });
|
||||
}
|
||||
});
|
||||
});*/
|
||||
});
|
||||
|
||||
function getCharaCardV2(jsonObject) {
|
||||
|
Reference in New Issue
Block a user