Simplify open appeals check
This commit is contained in:
parent
f6322728ab
commit
894baedb27
@ -44,7 +44,7 @@ export async function loader({ context }: { context: RequestContext }) {
|
|||||||
await dataKV.list({
|
await dataKV.list({
|
||||||
prefix: `appeal_${currentUser.id}`,
|
prefix: `appeal_${currentUser.id}`,
|
||||||
})
|
})
|
||||||
).keys.find((appeal) => (appeal.metadata as { [k: string]: any }).open)
|
).keys.length
|
||||||
),
|
),
|
||||||
can_toggle:
|
can_toggle:
|
||||||
currentUser.permissions & (1 << 0) || currentUser.permissions & (1 << 11),
|
currentUser.permissions & (1 << 0) || currentUser.permissions & (1 << 11),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user