mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
issue #136 - login redirects
Fixing logical error if there is no redirect Also removing console log
This commit is contained in:
parent
0973002b71
commit
2a7423c620
@ -67,9 +67,8 @@ adminControllers = {
|
||||
},
|
||||
'auth': function (req, res) {
|
||||
api.users.check({email: req.body.email, pw: req.body.password}).then(function (user) {
|
||||
console.log('user found: ', user);
|
||||
req.session.user = "ghostadmin";
|
||||
res.redirect('/ghost/' + req.query.r || '/ghost/');
|
||||
res.redirect(req.query.r ? '/ghost/' + req.query.r : '/ghost/');
|
||||
}, function (error) {
|
||||
// Do something here to signal the reason for an error
|
||||
req.flash('error', error.message);
|
||||
|
Loading…
Reference in New Issue
Block a user