Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Actually insert appeals into D1
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent acfd2be commit c848453
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions functions/api/appeals/submit.ts
Expand Up @@ -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: [
Expand Down

0 comments on commit c848453

Please sign in to comment.