fix: We need to check if the class ID is correct
This commit is contained in:
parent
7e27203f74
commit
f5c15c2289
@ -120,9 +120,9 @@ const password = encodeURIComponent(env["LATEINICUS_USER_PW"]);
|
||||
const { username, password, classId } = req.body;
|
||||
|
||||
// Check if the registration is open for the class Id
|
||||
// NOTE: Thiis to prevent people from spamming the database
|
||||
// NOTE: This to prevent people from spamming the database
|
||||
const classes = env["LATEINICUS_CLASSES"].split(",");
|
||||
if (classes.indexOf(classId) !== -1) {
|
||||
if (classes.indexOf(classId) === -1) {
|
||||
res.send({
|
||||
error: "403",
|
||||
data: {
|
||||
|
Reference in New Issue
Block a user