Simplify open appeals check

This commit is contained in:
regalijan 2023-10-19 16:49:11 -04:00
parent f6322728ab
commit 894baedb27
Signed by: regalijan
GPG Key ID: 5D4196DA269EF520

View File

@ -44,7 +44,7 @@ export async function loader({ context }: { context: RequestContext }) {
await dataKV.list({
prefix: `appeal_${currentUser.id}`,
})
).keys.find((appeal) => (appeal.metadata as { [k: string]: any }).open)
).keys.length
),
can_toggle:
currentUser.permissions & (1 << 0) || currentUser.permissions & (1 << 11),