can redirect authenticated users properly

This commit is contained in:
Michael Q Larson
2014-11-06 12:46:24 -08:00
parent 08ada3d4a0
commit cf9957b07c

View File

@ -4,7 +4,11 @@
*/ */
exports.index = function(req, res) { exports.index = function(req, res) {
res.render('home', { if (req.user) {
title: 'Home' res.redirect('challenges/a-one-minute-introduction-to-free-code-camp');
}); } else {
res.render('home', {
title: 'Home'
});
}
}; };