Fix appeal check
This commit is contained in:
parent
267cc02c96
commit
e12ecdfe33
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user