New formatting
This commit is contained in:
@ -15,7 +15,7 @@ export async function onRequestPost(context: RequestContext) {
|
||||
authorization: `Basic ${btoa("api:" + context.env.MAILGUN_API_KEY)}`,
|
||||
},
|
||||
method: "POST",
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (!emailReq.ok) {
|
||||
@ -38,7 +38,7 @@ export async function onRequestPost(context: RequestContext) {
|
||||
"x-audit-log-reason": `Appeal accepted by ${currentUser.username}#${currentUser.discriminator} (${currentUser.id})`,
|
||||
},
|
||||
method: "DELETE",
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
await fetch(context.env.APPEALS_WEBHOOK, {
|
||||
|
@ -11,7 +11,7 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
await context.env.DATA.put(
|
||||
`appealban_${context.data.targetId}`,
|
||||
JSON.stringify({ moderator: currentUser.id })
|
||||
JSON.stringify({ moderator: currentUser.id }),
|
||||
);
|
||||
await fetch(context.env.APPEALS_WEBHOOK, {
|
||||
body: JSON.stringify({
|
||||
|
@ -15,7 +15,7 @@ export async function onRequestPost(context: RequestContext) {
|
||||
authorization: `Basic ${btoa("api:" + context.env.MAILGUN_API_KEY)}`,
|
||||
},
|
||||
method: "POST",
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
if (!emailReq.ok) {
|
||||
|
@ -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, {
|
||||
|
Reference in New Issue
Block a user