Replaced hardcoded success flash with express-flash
This commit is contained in:
@ -43,6 +43,7 @@ exports.postLogin = function(req, res, next) {
|
||||
|
||||
req.logIn(user, function(err) {
|
||||
if (err) return next(err);
|
||||
req.flash('info', { msg: 'Success! You are logged in.' });
|
||||
return res.redirect('/');
|
||||
});
|
||||
})(req, res, next);
|
||||
|
Reference in New Issue
Block a user