From c848453b1b33ce7d2cf72a99b9e602bb86a29330 Mon Sep 17 00:00:00 2001 From: regalijan Date: Thu, 19 Oct 2023 16:50:37 -0400 Subject: [PATCH] Actually insert appeals into D1 --- functions/api/appeals/submit.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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: [