From f5c15c2289211605199965ebb45681fe90acc81f Mon Sep 17 00:00:00 2001 From: Alexander Polynomdivision Date: Tue, 9 Oct 2018 12:55:56 +0200 Subject: [PATCH] fix: We need to check if the class ID is correct --- backend/src/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main.ts b/backend/src/main.ts index cd87e63..be1538a 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -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: {