fixed defect where no flash (error/success) messages would be displayed due to wrongly placed flash() call (it should go after passport.initialize and passport.session)

This commit is contained in:
Liran Tal
2014-01-18 00:22:16 +02:00
parent 6bacb0c79e
commit 55aeaadd61

View File

@@ -56,9 +56,6 @@ module.exports = function(app, passport, db) {
})
}));
// Connect flash for flash messages
app.use(flash());
// Dynamic helpers
app.use(helpers(config.app.name));
@@ -66,6 +63,9 @@ module.exports = function(app, passport, db) {
app.use(passport.initialize());
app.use(passport.session());
// Connect flash for flash messages
app.use(flash());
// Routes should be at the last
app.use(app.router);