From 2f200f889aa145c6d40e790e6b9d67e77a3215ce Mon Sep 17 00:00:00 2001 From: Regalijan Date: Tue, 3 Dec 2024 23:23:08 -0500 Subject: [PATCH] Convert decisions and departments objects to proper json objects --- functions/api/mod-queue/[type]/[id].ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions/api/mod-queue/[type]/[id].ts b/functions/api/mod-queue/[type]/[id].ts index 32309a2..8158b33 100644 --- a/functions/api/mod-queue/[type]/[id].ts +++ b/functions/api/mod-queue/[type]/[id].ts @@ -57,6 +57,11 @@ export async function onRequestGet(context: RequestContext) { delete item.user.email; } + if (type === "inactivity") { + item.decisions = JSON.parse(item.decisions); + item.departments = JSON.parse(item.departments); + } + return item ? jsonResponse(JSON.stringify(item)) : jsonError("Not found", 404);