mirror of
https://github.com/reality/dbot.git
synced 2024-12-25 04:02:39 +01:00
fix more redirects
This commit is contained in:
parent
329b45e895
commit
b069ce4b0d
@ -121,10 +121,7 @@ var webInterface = function(dbot) {
|
|||||||
if(req.body.redirect) {
|
if(req.body.redirect) {
|
||||||
res.redirect(req.body.redirect);
|
res.redirect(req.body.redirect);
|
||||||
} else {
|
} else {
|
||||||
res.render('login', {
|
res.redirect('/');
|
||||||
'user': req.user,
|
|
||||||
'message': 'Successfully logged in!'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -173,7 +170,7 @@ var webInterface = function(dbot) {
|
|||||||
if(_.include(allowedUsers, req.user.primaryNick)) {
|
if(_.include(allowedUsers, req.user.primaryNick)) {
|
||||||
return next();
|
return next();
|
||||||
} else {
|
} else {
|
||||||
res.redirect('index');
|
res.redirect('/');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return next();
|
return next();
|
||||||
|
Loading…
Reference in New Issue
Block a user