diff --git a/functions/api/reports/recall.ts b/functions/api/reports/recall.ts index 43d48f2..420308a 100644 --- a/functions/api/reports/recall.ts +++ b/functions/api/reports/recall.ts @@ -11,7 +11,7 @@ export async function onRequestPost(context: RequestContext) { const reportUserId = await context.env.DATA.get(`reportprocessing_${id}`); - if (!reportUserId || context.data.current_user.id !== reportUserId) + if (!reportUserId || context.data.current_user?.id !== reportUserId) return new Response('{"error":"No processing report with that ID found"}', { headers: { "content-type": "application/json",