Move some events team stuff to prisma
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 54s
Test, Build, Deploy / Create Sentry Release (push) Successful in 6s

This commit is contained in:
2026-04-11 03:16:58 -04:00
parent 95ab13775b
commit 465bb30966
3 changed files with 45 additions and 41 deletions

View File

@@ -45,15 +45,15 @@ export async function loader({
status: 403,
});
const strikeData = await context.env.D1.prepare(
"SELECT * FROM et_strikes WHERE user = ?;",
)
.bind(params.uid)
.all();
const strikes = await context.data.prisma.etStrike.findMany({
where: {
user: params.uid,
},
});
return {
can_manage: Boolean([1 << 4, 1 << 12].find((p) => user.permissions & p)),
strikes: strikeData.results,
strikes,
user: params.uid,
};
}