Fix object-stringifying of things that shouldn't be stringified

This commit is contained in:
2025-09-11 15:40:57 -04:00
parent f2c332b649
commit 56c5e6dc0f

View File

@@ -25,6 +25,11 @@ export async function onRequestGet(context: RequestContext) {
if (!data || data.user?.id !== context.data.current_user.id)
return jsonError("Item does not exist", 404);
if (type === "inactivity") {
data.decisions = JSON.parse(data.decisions);
data.departments = JSON.parse(data.departments);
}
if (type === "report") {
data.attachments = JSON.parse(data.attachments);
data.target_ids = JSON.parse(data.target_ids);