More events team nonsense
This commit is contained in:
@@ -12,9 +12,14 @@ export async function onRequestPost(context: RequestContext) {
|
||||
|
||||
if (typeof points !== "number") return jsonError("Invalid point count", 400);
|
||||
|
||||
await context.env.D1.prepare("UPDATE et_members SET points = ? WHERE id = ?;")
|
||||
.bind(points, context.params.id)
|
||||
.run();
|
||||
await context.data.prisma.etMember.update({
|
||||
data: {
|
||||
points,
|
||||
},
|
||||
where: {
|
||||
id: context.params.id as string,
|
||||
},
|
||||
});
|
||||
|
||||
return new Response(null, {
|
||||
status: 204,
|
||||
|
||||
Reference in New Issue
Block a user