Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix existing appeal check
  • Loading branch information
regalijan committed May 15, 2024
1 parent 90f7a93 commit 111b25b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/appeals.tsx
Expand Up @@ -41,7 +41,7 @@ export async function loader({ context }: { context: RequestContext }) {
!Boolean(await dataKV.get(`blockedappeal_${currentUser.id}`)) &&
!Boolean(
await context.env.D1.prepare(
"SELECT * FROM appeals WHERE open = 1 AND user = ? LIMIT 1;",
"SELECT * FROM appeals WHERE approved IS NULL AND json_extract(user, '$.id') = ? LIMIT 1;",
)
.bind(currentUser.id)
.first(),
Expand Down

0 comments on commit 111b25b

Please sign in to comment.