From de3d62b66bfd7b0a26a69246eea6a2dc8b08cf3e Mon Sep 17 00:00:00 2001 From: Precious Jahlom Agboado Date: Fri, 7 Feb 2014 08:04:22 +0000 Subject: [PATCH] Replaced hardcoded success flash with express-flash --- controllers/user.js | 1 + views/home.jade | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/controllers/user.js b/controllers/user.js index 525712e4b9..c685453291 100644 --- a/controllers/user.js +++ b/controllers/user.js @@ -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); diff --git a/views/home.jade b/views/home.jade index c9ce2c7668..0e88a7aa4f 100644 --- a/views/home.jade +++ b/views/home.jade @@ -5,10 +5,4 @@ block content p.lead | 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. \ No newline at end of file + | All you get is this text and a mostly barebones HTML document. \ No newline at end of file