Convert decisions and departments objects to proper json objects
This commit is contained in:
parent
f5ca4839d3
commit
2f200f889a
@ -57,6 +57,11 @@ export async function onRequestGet(context: RequestContext) {
|
|||||||
delete item.user.email;
|
delete item.user.email;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type === "inactivity") {
|
||||||
|
item.decisions = JSON.parse(item.decisions);
|
||||||
|
item.departments = JSON.parse(item.departments);
|
||||||
|
}
|
||||||
|
|
||||||
return item
|
return item
|
||||||
? jsonResponse(JSON.stringify(item))
|
? jsonResponse(JSON.stringify(item))
|
||||||
: jsonError("Not found", 404);
|
: jsonError("Not found", 404);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user