Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix appeal check
  • Loading branch information
regalijan committed Oct 19, 2023
1 parent 267cc02 commit e12ecdf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/routes/appeals.tsx
Expand Up @@ -40,11 +40,11 @@ export async function loader({ context }: { context: RequestContext }) {
!Boolean(disabled) &&
!Boolean(await dataKV.get(`blockedappeal_${currentUser.id}`)) &&
!Boolean(
(
await dataKV.list({
prefix: `appeal_${currentUser.id}`,
})
).keys.length,
await context.env.D1.prepare(
"SELECT * FROM appeals WHERE open = 1 AND user = ? LIMIT 1;",
)
.bind(currentUser.id)
.first(),
),
can_toggle:
currentUser.permissions & (1 << 0) || currentUser.permissions & (1 << 11),
Expand Down

0 comments on commit e12ecdf

Please sign in to comment.