Actually insert appeals into D1

This commit is contained in:
regalijan 2023-10-19 16:50:37 -04:00
parent acfd2be227
commit c848453b1b
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -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: [