Fix link errors in randomAPIs

This commit is contained in:
Berkeley Martinez
2015-10-07 00:28:42 -07:00
parent 7a4f5d752c
commit 241ca8097d

View File

@ -100,10 +100,10 @@ module.exports = function(app) {
}); });
}, },
challenges: function (callback) { challenges: function(callback) {
Challenge.find( Challenge.find(
{ fields: { name: true } }, { fields: { name: true } },
function (err, challenges) { function(err, challenges) {
if (err) { if (err) {
debug('Challenge err: ', err); debug('Challenge err: ', err);
callback(err); callback(err);
@ -120,10 +120,10 @@ module.exports = function(app) {
} }
}); });
}, },
stories: function (callback) { stories: function(callback) {
Story.find( Story.find(
{ field: { link: true } }, { field: { link: true } },
function (err, stories) { function(err, stories) {
if (err) { if (err) {
debug('Story err: ', err); debug('Story err: ', err);
callback(err); callback(err);
@ -141,7 +141,7 @@ module.exports = function(app) {
} }
); );
}, },
nonprofits: function (callback) { nonprofits: function(callback) {
Nonprofit.find( Nonprofit.find(
{ field: { name: true } }, { field: { name: true } },
function(err, nonprofits) { function(err, nonprofits) {
@ -215,13 +215,6 @@ module.exports = function(app) {
}); });
} }
function catPhotoSubmit(req, res) {
res.send(
'Success! You have submitted your cat photo. Return to your website ' +
'by typing any letter into your code editor.'
);
}
function sponsors(req, res) { function sponsors(req, res) {
res.render('sponsors/sponsors', { res.render('sponsors/sponsors', {
title: 'The Sponsors who make Free Code Camp Possible' title: 'The Sponsors who make Free Code Camp Possible'
@ -265,7 +258,7 @@ module.exports = function(app) {
return next(err); return next(err);
} }
user.sendMonthlyEmail = false; user.sendMonthlyEmail = false;
user.save(function () { user.save(function() {
if (err) { if (err) {
return next(err); return next(err);
} }
@ -320,7 +313,7 @@ module.exports = function(app) {
secrets.github.clientSecret secrets.github.clientSecret
].join(''), ].join(''),
githubHeaders, githubHeaders,
function (err, status2, issues) { function(err, status2, issues) {
if (err) { return next(err); } if (err) { return next(err); }
issues = ((pulls === parseInt(pulls, 10)) && issues) ? issues = ((pulls === parseInt(pulls, 10)) && issues) ?
Object.keys(JSON.parse(issues)).length - pulls : Object.keys(JSON.parse(issues)).length - pulls :
@ -354,7 +347,7 @@ module.exports = function(app) {
'https://www.googleapis.com/blogger/v3/blogs/2421288658305323950/' + 'https://www.googleapis.com/blogger/v3/blogs/2421288658305323950/' +
'posts?key=' + 'posts?key=' +
secrets.blogger.key, secrets.blogger.key,
function (err, status, blog) { function(err, status, blog) {
if (err) { return next(err); } if (err) { return next(err); }
blog = (status && status.statusCode === 200) ? blog = (status && status.statusCode === 200) ?