Added isAuthorized middleware to tumblr and foursquare routes

This commit is contained in:
Sahat Yalkabov
2013-12-08 02:23:59 -05:00
parent 51001a0497
commit 195f916f56
2 changed files with 11 additions and 10 deletions

14
app.js
View File

@ -54,23 +54,23 @@ app.get('/logout', user.logout);
app.get('/signup', user.getSignup);
app.post('/signup', user.postSignup);
app.get('/account', passportConf.ensureAuthenticated, user.getAccount);
app.post('/account/profile', passportConf.ensureAuthenticated, user.postAccountProfile);
app.post('/account/settings', passportConf.ensureAuthenticated, user.postAccountSettings);
app.get('/account', passportConf.isAuthenticated, user.getAccount);
app.post('/account/profile', passportConf.isAuthenticated, user.postAccountProfile);
app.post('/account/settings', passportConf.isAuthenticated, user.postAccountSettings);
app.get('/partials/:name', home.partials);
app.get('/api', api.getApi);
app.get('/api/foursquare', passportConf.ensureAuthenticated, api.getFoursquare);
app.get('/api/tumblr', passportConf.ensureAuthenticated, api.getTumblr);
app.get('/api/facebook', passportConf.ensureAuthenticated, api.getFacebook);
app.get('/api/foursquare', passportConf.isAuthenticated, passportConf.isAuthorized('foursquare'), api.getFoursquare);
app.get('/api/tumblr', passportConf.isAuthenticated, passportConf.isAuthorized('foursquare'), api.getTumblr);
app.get('/api/facebook', passportConf.isAuthenticated, api.getFacebook);
app.get('/api/scraping', api.getScraping);
app.get('/api/github', passportConf.isAuthorized('github'), api.getGithub);
app.get('/api/lastfm', api.getLastfm);
app.get('/api/nyt', api.getNewYorkTimes);
app.get('/api/twilio', api.getTwilio);
app.get('/api/etsy', api.getEtsy);
app.get('/api/twitter', passportConf.ensureAuthenticated, api.getTwitter);
app.get('/api/twitter', passportConf.isAuthenticated, api.getTwitter);
app.get('/api/aviary', api.getAviary);
app.get('/contact', contact.getContact);