Fix report fetch links
This commit is contained in:
parent
111b25b3da
commit
1d22fd91b1
@ -42,12 +42,15 @@ export async function onRequestGet(context: RequestContext) {
|
||||
|
||||
if (!item) return jsonError("Item not found", 404);
|
||||
|
||||
if (
|
||||
type === "report" &&
|
||||
(await context.env.DATA.get(`reportprocessing_${itemId}`))
|
||||
)
|
||||
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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user