fix: We need to check if the class ID is correct

This commit is contained in:
Alexander Polynomdivision 2018-10-09 12:55:56 +02:00
parent 7e27203f74
commit f5c15c2289

View File

@ -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: {