Skip to content
Snippets Groups Projects
Commit bc908a1b authored by Fabien Zucchet's avatar Fabien Zucchet
Browse files

fix bug

parent ea6f9b5b
Branches
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@ async function getUsersPerformance(req, res) {
function isAdminMiddleware(req, res, next) {
console.log(req.session.ids);
const login = req.session.ids.user.login || '';
const login = req.session.login || '';
const admins = getAdminsLogins();
if (admins.includes(login)) {
return next();
......
......@@ -73,7 +73,7 @@ function getStaffeursLogins(req, res) {
}
function isStaffMiddleware(req, res, next) {
const login = req.session.ids.user.login || '';
const login = req.session.ids.login || '';
const staffs = getStaffLogins();
if (staffs.includes(login)) {
return next();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment