Skip to content

Commit

Permalink
Update panel.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Bumblebee-3 authored Jul 23, 2023
1 parent 6da8b4e commit 9e1ada1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,21 @@ class Panel {

console.log("\x1b[32m%s\x1b[0m", "aoi.js Panel GUI ready on port: " + params.port)
}
isLoggedIn(req,res,next){
isLoggedIn(req,res){
const data = this.data;
if(Array.isArray(data.username)){
for(let i=0;i<data.username.length;i++){
if(req.session.username==data.username[i] && req.session.password==data.password[i]){
return next();
return true;
}
}
return res.redirect("/")
return false;
}
else {
if(req.session.username==data.username&&req.session.password==data.password){
return next();
return true;
}
return res.redirect("/")
return false;
}
}

Expand Down

0 comments on commit 9e1ada1

Please sign in to comment.