Skip to content
Snippets Groups Projects
Commit f2bc391a authored by Pinglei He's avatar Pinglei He
Browse files

removed unused variables

parent d2bbf7f0
Branches master
No related tags found
No related merge requests found
Pipeline #35258 failed
const MEMBERS = ['lej', 'gowoons', 'dog']; const MEMBERS = ["lej", "gowoons", "dog"];
const cetteVariableEstInutile = 'à supprimer';
// Check if an user is a member // Check if an user is a member
function isMember(login) { function isMember(login) {
...@@ -8,14 +7,16 @@ function isMember(login) { ...@@ -8,14 +7,16 @@ function isMember(login) {
// Check if an user is a valid administrator // Check if an user is a valid administrator
function adminStatus(login, password) { function adminStatus(login, password) {
if (login === process.env.ADMIN_USERNAME && password === process.env.ADMIN_PASSWORD) { if (
login === process.env.ADMIN_USERNAME &&
password === process.env.ADMIN_PASSWORD
) {
return { msg: `User ${login} is verified as an admin`, status: 200 }; return { msg: `User ${login} is verified as an admin`, status: 200 };
} else if (login === process.env.ADMIN_USERNAME) { } else if (login === process.env.ADMIN_USERNAME) {
return { msg: `Wrong password for ${login} user`, status: 401 }; return { msg: `Wrong password for ${login} user`, status: 401 };
} else { } else {
return { msg: `User ${login} is not an admin`, status: 401 }; return { msg: `User ${login} is not an admin`, status: 401 };
} }
console.log("Ce texte n'est jamais affiché")
} }
module.exports.isMember = isMember; module.exports.isMember = isMember;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment