Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix report fetch links
  • Loading branch information
regalijan committed May 15, 2024
1 parent 111b25b commit 1d22fd9
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions functions/api/mod-queue/[type]/[id].ts
Expand Up @@ -42,11 +42,14 @@ export async function onRequestGet(context: RequestContext) {

if (!item) return jsonError("Item not found", 404);

if (
type === "report" &&
(await context.env.DATA.get(`reportprocessing_${itemId}`))
)
return jsonError("Report is processing", 409);
if (type === "report") {
if (await context.env.DATA.get(`reportprocessing_${itemId}`))
return jsonError("Report is processing", 409);

item.attachments = JSON.parse(item.attachments);
item.target_ids = JSON.parse(item.target_ids);
item.target_usernames = JSON.parse(item.target_usernames);
}

if (item.user) {
item.user = JSON.parse(item.user);
Expand Down

0 comments on commit 1d22fd9

Please sign in to comment.