Code cleanup
This commit is contained in:
1
app.js
1
app.js
@ -71,6 +71,7 @@ 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/aviary', passportConf.ensureAuthenticated, api.getAviary);
|
||||
|
||||
app.get('/contact', contact.getContact);
|
||||
app.post('/contact', contact.postContact);
|
||||
|
@ -25,7 +25,6 @@ exports.getApi = function(req, res) {
|
||||
*/
|
||||
exports.getFoursquare = function(req, res) {
|
||||
var token = _.findWhere(req.user.tokens, { kind: 'foursquare' });
|
||||
|
||||
if (!token) {
|
||||
return res.render('api/unauthorized', {
|
||||
title: 'Foursquare API',
|
||||
@ -33,7 +32,6 @@ exports.getFoursquare = function(req, res) {
|
||||
user: req.user
|
||||
});
|
||||
}
|
||||
|
||||
async.parallel({
|
||||
trendingVenues: function(callback) {
|
||||
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) {
|
||||
|
||||
};
|
||||
|
@ -4,6 +4,8 @@ block content
|
||||
h2 API Browser
|
||||
|
||||
ul.list-unstyled.lead
|
||||
li
|
||||
a(href='/api/aviary') Aviary
|
||||
li
|
||||
a(href='/api/etsy') Etsy
|
||||
li
|
||||
@ -24,5 +26,3 @@ block content
|
||||
a(href='/api/twilio') Twilio
|
||||
li
|
||||
a(href='/api/scraping') Web Scraping
|
||||
|
||||
|
||||
|
@ -17,8 +17,6 @@ block content
|
||||
| API Endpoints
|
||||
|
||||
h3.text-primary #{blog.name}'s blog
|
||||
h4 Blog Stats
|
||||
p
|
||||
.btn.btn-xs.btn-primary-outline
|
||||
i.fa.fa-file-text-o
|
||||
| #{blog.posts} posts
|
||||
|
Reference in New Issue
Block a user