More events team nonsense
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user