diff --git a/functions/api/me/items/[type]/[id].ts b/functions/api/me/items/[type]/[id].ts index 0e2b9e7..c595b54 100644 --- a/functions/api/me/items/[type]/[id].ts +++ b/functions/api/me/items/[type]/[id].ts @@ -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);