can redirect authenticated users properly
This commit is contained in:
@ -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'
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
Reference in New Issue
Block a user