Code cleanup

This commit is contained in:
Sahat Yalkabov
2013-12-08 01:17:12 -05:00
parent ba75d67688
commit 58805c678d
4 changed files with 13 additions and 9 deletions

1
app.js
View File

@ -71,6 +71,7 @@ app.get('/api/nyt', api.getNewYorkTimes);
app.get('/api/twilio', api.getTwilio); app.get('/api/twilio', api.getTwilio);
app.get('/api/etsy', api.getEtsy); app.get('/api/etsy', api.getEtsy);
app.get('/api/twitter', passportConf.ensureAuthenticated, api.getTwitter); app.get('/api/twitter', passportConf.ensureAuthenticated, api.getTwitter);
app.get('/api/aviary', passportConf.ensureAuthenticated, api.getAviary);
app.get('/contact', contact.getContact); app.get('/contact', contact.getContact);
app.post('/contact', contact.postContact); app.post('/contact', contact.postContact);

View File

@ -25,7 +25,6 @@ exports.getApi = function(req, res) {
*/ */
exports.getFoursquare = function(req, res) { exports.getFoursquare = function(req, res) {
var token = _.findWhere(req.user.tokens, { kind: 'foursquare' }); var token = _.findWhere(req.user.tokens, { kind: 'foursquare' });
if (!token) { if (!token) {
return res.render('api/unauthorized', { return res.render('api/unauthorized', {
title: 'Foursquare API', title: 'Foursquare API',
@ -33,7 +32,6 @@ exports.getFoursquare = function(req, res) {
user: req.user user: req.user
}); });
} }
async.parallel({ async.parallel({
trendingVenues: function(callback) { trendingVenues: function(callback) {
var geo = geoip.lookup('4.17.136.0'); var geo = geoip.lookup('4.17.136.0');
@ -176,6 +174,13 @@ exports.getTwilio = function(req, res) {
}; };
/**
* GET /api/aviary
*/
exports.getAviary = function(req, res) {
};
exports.getEtsy = function(req, res) { exports.getEtsy = function(req, res) {
}; };

View File

@ -4,6 +4,8 @@ block content
h2 API Browser h2 API Browser
ul.list-unstyled.lead ul.list-unstyled.lead
li
a(href='/api/aviary') Aviary
li li
a(href='/api/etsy') Etsy a(href='/api/etsy') Etsy
li li
@ -24,5 +26,3 @@ block content
a(href='/api/twilio') Twilio a(href='/api/twilio') Twilio
li li
a(href='/api/scraping') Web Scraping a(href='/api/scraping') Web Scraping

View File

@ -17,11 +17,9 @@ block content
| API Endpoints | API Endpoints
h3.text-primary #{blog.name}'s blog h3.text-primary #{blog.name}'s blog
h4 Blog Stats .btn.btn-xs.btn-primary-outline
p i.fa.fa-file-text-o
.btn.btn-xs.btn-primary-outline | #{blog.posts} posts
i.fa.fa-file-text-o
| #{blog.posts} posts
h4 Latest Photo Post h4 Latest Photo Post
for photo in photoset for photo in photoset
img.item(src='#{photo.original_size.url}') img.item(src='#{photo.original_size.url}')