mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-25 16:30:09 +01:00
Prettyprint exported character JSONs
This commit is contained in:
parent
cb32e28b82
commit
a3e3185220
@ -1007,7 +1007,7 @@ router.post('/export', jsonParser, async function (request, response) {
|
|||||||
let json = await charaRead(filename);
|
let json = await charaRead(filename);
|
||||||
if (json === undefined) return response.sendStatus(400);
|
if (json === undefined) return response.sendStatus(400);
|
||||||
let jsonObject = getCharaCardV2(JSON.parse(json));
|
let jsonObject = getCharaCardV2(JSON.parse(json));
|
||||||
return response.type('json').send(jsonObject);
|
return response.type('json').send(JSON.stringify(jsonObject, null, 4));
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
return response.sendStatus(400);
|
return response.sendStatus(400);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user