Unset private fields from JSON exports
| @@ -1437,9 +1437,10 @@ router.post('/export', validateAvatarUrlMiddleware, async function (request, res | ||
| 1437 | 1437 | } |
| 1438 | 1438 | case 'json': { |
| 1439 | 1439 | try { |
| 1440 | 1440 | letconst json = await readCharacterData(filename); |
| 1441 | 1441 | if (json === undefined) return response.sendStatus(400); |
| 1442 | 1442 | letconst jsonObject = getCharaCardV2(JSON.parse(json), request.user.directories); |
| 1443 | + unsetPrivateFields(jsonObject); | |
| 1443 | 1444 | return response.type('json').send(JSON.stringify(jsonObject, null, 4)); |
| 1444 | 1445 | } |
| 1445 | 1446 | catch { |