New formatting

This commit is contained in:
2023-10-19 16:50:21 -04:00
parent 0b5e82bfcc
commit 026d1ca06d
30 changed files with 76 additions and 76 deletions

View File

@ -19,7 +19,7 @@ export async function onRequestPost(context: RequestContext) {
"content-type": "application/json",
},
status: 400,
}
},
);
const { current_user: currentUser } = context.data;
@ -36,13 +36,13 @@ export async function onRequestPost(context: RequestContext) {
prefix: `appeal_${currentUser.id}`,
});
const existingBlockedAppeal = await context.env.DATA.get(
`blockedappeal_${currentUser.id}`
`blockedappeal_${currentUser.id}`,
);
if (
existingBlockedAppeal ||
existingAppeals.keys.find(
(appeal) => (appeal.metadata as { [k: string]: any })?.open
(appeal) => (appeal.metadata as { [k: string]: any })?.open,
)
)
return new Response('{"error":"Appeal already submitted"}', {
@ -82,7 +82,7 @@ export async function onRequestPost(context: RequestContext) {
}),
{
expirationTtl: 94608000,
}
},
);
await fetch(context.env.APPEALS_WEBHOOK, {