| 1437 | } | 1437 | } |
| 1438 | case 'json': { | 1438 | case 'json': { |
| 1439 | try { | 1439 | try { |
| 1440 | let json = await readCharacterData(filename); | 1440 | const json = await readCharacterData(filename); |
| 1441 | if (json === undefined) return response.sendStatus(400); | 1441 | if (json === undefined) return response.sendStatus(400); |
| 1442 | let jsonObject = getCharaCardV2(JSON.parse(json), request.user.directories); | 1442 | const jsonObject = getCharaCardV2(JSON.parse(json), request.user.directories); |
| | 1443 | unsetPrivateFields(jsonObject); |
| 1443 | return response.type('json').send(JSON.stringify(jsonObject, null, 4)); | 1444 | return response.type('json').send(JSON.stringify(jsonObject, null, 4)); |
| 1444 | } | 1445 | } |
| 1445 | catch { | 1446 | catch { |