Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apparently .run() does not return results
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent f6251b2 commit 3ec0a30
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions functions/api/appeals/submit.ts
Expand Up @@ -53,11 +53,9 @@ export async function onRequestPost(context: RequestContext) {
});

if (
(
await context.env.D1.prepare("SELECT * FROM appeal_bans WHERE user = ?;")
.bind(currentUser.id)
.run()
).results.length
await context.env.D1.prepare("SELECT * FROM appeal_bans WHERE user = ?;")
.bind(currentUser.id)
.first()
) {
await context.env.DATA.put(`blockedappeal_${currentUser.id}`, "1", {
metadata: { email: currentUser.email },
Expand Down

0 comments on commit 3ec0a30

Please sign in to comment.