mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Unset private fields from JSON exports
This commit is contained in:
@@ -1437,9 +1437,10 @@ router.post('/export', validateAvatarUrlMiddleware, async function (request, res
|
||||
}
|
||||
case 'json': {
|
||||
try {
|
||||
let json = await readCharacterData(filename);
|
||||
const json = await readCharacterData(filename);
|
||||
if (json === undefined) return response.sendStatus(400);
|
||||
let jsonObject = getCharaCardV2(JSON.parse(json), request.user.directories);
|
||||
const jsonObject = getCharaCardV2(JSON.parse(json), request.user.directories);
|
||||
unsetPrivateFields(jsonObject);
|
||||
return response.type('json').send(JSON.stringify(jsonObject, null, 4));
|
||||
}
|
||||
catch {
|
||||
|
Reference in New Issue
Block a user