Update: Add console.log token

This commit is contained in:
Yûki VACHOT 2021-12-29 18:10:05 +01:00
parent 7a9ee00eb5
commit a9c959bf3f

View file

@ -81,6 +81,7 @@ function checkLogin(req, res, role=null){
if(typeof req.cookies !== 'undefined'){ if(typeof req.cookies !== 'undefined'){
const session = getSession(req.cookies.SESSIONID); const session = getSession(req.cookies.SESSIONID);
const token = getToken(session); const token = getToken(session);
console.log(token);
if(typeof token.email === 'undefined' || if(typeof token.email === 'undefined' ||
token.email === -1 || token.email === -1 ||
typeof token.id === 'undefined' || typeof token.id === 'undefined' ||