Tumblr now also redirects to unauthorized page if no token found

This commit is contained in:
Sahat Yalkabov
2013-12-07 01:46:49 -05:00
parent 2c15e7774c
commit 388599ac28
3 changed files with 9 additions and 12 deletions

View File

@ -65,6 +65,13 @@ exports.getFoursquare = function(req, res) {
* GET /api/tumblr
*/
exports.getTumblr = function(req, res) {
if (!req.user.tokens.tumblr) {
return res.render('api/unauthorized', {
title: 'Tumblr API',
provider: 'Tumblr',
user: req.user
});
}
res.render('api/tumblr', {
title: 'Tumblr API',