More events team nonsense
All checks were successful
Test, Build, Deploy / Test, Build, and Deploy (push) Successful in 55s
Test, Build, Deploy / Create Sentry Release (push) Successful in 6s

This commit is contained in:
2026-04-11 03:30:46 -04:00
parent 465bb30966
commit cfc57c838e
17 changed files with 355 additions and 259 deletions

View File

@@ -1,7 +1,9 @@
export async function onRequestDelete(context: RequestContext) {
await context.env.D1.prepare("DELETE FROM et_strikes WHERE id = ?;")
.bind(context.params.id)
.run();
await context.data.prisma.etStrike.delete({
where: {
id: context.params.id as string,
},
});
return new Response(null, {
status: 204,

View File

@@ -11,9 +11,11 @@ export async function onRequestPost(context: RequestContext) {
user.length > 20 ||
user.length < 17 ||
user.match(/\D/) ||
!(await D1.prepare("SELECT id FROM et_members WHERE id = ?;")
.bind(user)
.first())
!(await context.data.prisma.etMember.findUnique({
where: {
id: user,
},
}))
)
return jsonError("Invalid user id", 400);