Created
September 14, 2015 19:04
-
-
Save StephanyBatista/221b6037357abefc6c29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(app){ | |
var homeController = { | |
index: function(request, response){ | |
response.render('home/index', {title: 'teste'}); | |
}, | |
logon: function(request, response){ | |
if(!request.user) | |
response.redirect('/'); | |
request.session.user = { | |
name: request.user.displayName, | |
picture: request.user.photos[0].value | |
}; | |
response.redirect('/chat'); | |
} | |
}; | |
return homeController; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment