diff --git a/functions/api/appeals/submit.ts b/functions/api/appeals/submit.ts index 5422d96..01c48eb 100644 --- a/functions/api/appeals/submit.ts +++ b/functions/api/appeals/submit.ts @@ -85,6 +85,12 @@ export async function onRequestPost(context: RequestContext) { }, ); + await context.env.D1.prepare( + "INSERT INTO appeals (created_at, id, open, user) VALUES (?, ?, ?, ?)", + ) + .bind(Date.now(), appealId, 1, currentUser.id) + .run(); + await fetch(context.env.APPEALS_WEBHOOK, { body: JSON.stringify({ embeds: [