Add processing key check for reports
This commit is contained in:
parent
c7945de0ac
commit
e84b02c403
@ -34,6 +34,17 @@ export async function onRequestGet(context: RequestContext) {
|
||||
if (!item)
|
||||
item = await context.env.DATA.get(`closed${types[type].prefix}${itemId}`);
|
||||
|
||||
if (
|
||||
type === "report" &&
|
||||
(await context.env.DATA.get(`reportprocessing_${itemId}`))
|
||||
)
|
||||
return new Response('{"error":"Report is processing"}', {
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
},
|
||||
status: 409,
|
||||
});
|
||||
|
||||
return new Response(item ? item : '{"error":"Not found"}', {
|
||||
headers: {
|
||||
"content-type": "application/json",
|
||||
|
Loading…
x
Reference in New Issue
Block a user