Replaced hardcoded success flash with express-flash

This commit is contained in:
Precious Jahlom Agboado
2014-02-07 08:04:22 +00:00
parent 1cc0bb4526
commit de3d62b66b
2 changed files with 2 additions and 7 deletions

View File

@ -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);

View File

@ -6,9 +6,3 @@ block content
| Use this document as a way to quickly start any new project.
br
| All you get is this text and a mostly barebones HTML document.
if user
.alert.alert-success.animated.flipInX
i.fa.fa-check
strong Success!
| You are logged in.