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

@@ -42,20 +42,16 @@ export async function loader({ context }: { context: RequestContext }) {
status: 403,
});
const etData = await context.env.D1.prepare(
"SELECT id, name, points, roblox_id FROM et_members;",
).all();
const etData = await context.data.prisma.etMember.findMany({
select: {
id: true,
name: true,
points: true,
roblox_id: true,
},
});
if (etData.error)
throw new Response(null, {
status: 500,
});
const members = etData.results as { [k: string]: any }[];
return { members } as {
members: { [k: string]: any }[];
};
return { members: etData };
}
export default function () {