Update eslint, fix lint issues
This commit is contained in:
@ -145,7 +145,7 @@ module.exports = function(app) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
process.nextTick(function() {
|
||||
return process.nextTick(function() {
|
||||
res.header('Content-Type', 'application/xml');
|
||||
res.render('resources/sitemap', {
|
||||
appUrl: appUrl,
|
||||
@ -227,14 +227,18 @@ module.exports = function(app) {
|
||||
}
|
||||
|
||||
function confirmStickers(req, res) {
|
||||
req.flash('success', { msg: 'Thank you for supporting our community! You should receive your stickers in the ' +
|
||||
'mail soon!'});
|
||||
res.redirect('/shop');
|
||||
req.flash('success', {
|
||||
msg: 'Thank you for supporting our community! You should receive ' +
|
||||
'your stickers in the mail soon!'
|
||||
});
|
||||
res.redirect('/shop');
|
||||
}
|
||||
|
||||
function cancelStickers(req, res) {
|
||||
req.flash('info', { msg: 'You\'ve cancelled your purchase of our stickers. You can '
|
||||
+ 'support our community any time by buying some.'});
|
||||
req.flash('info', {
|
||||
msg: 'You\'ve cancelled your purchase of our stickers. You can ' +
|
||||
'support our community any time by buying some.'
|
||||
});
|
||||
res.redirect('/shop');
|
||||
}
|
||||
function submitCatPhoto(req, res) {
|
||||
@ -280,18 +284,14 @@ module.exports = function(app) {
|
||||
function unsubscribe(req, res, next) {
|
||||
User.findOne({ where: { email: req.params.email } }, function(err, user) {
|
||||
if (user) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
if (err) { return next(err); }
|
||||
user.sendMonthlyEmail = false;
|
||||
user.save(function() {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
res.redirect('/unsubscribed');
|
||||
return user.save(function() {
|
||||
if (err) { return next(err); }
|
||||
return res.redirect('/unsubscribed');
|
||||
});
|
||||
} else {
|
||||
res.redirect('/unsubscribed');
|
||||
return res.redirect('/unsubscribed');
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -330,7 +330,7 @@ module.exports = function(app) {
|
||||
Object.keys(JSON.parse(pulls)).length :
|
||||
'Can\'t connect to github';
|
||||
|
||||
request(
|
||||
return request(
|
||||
[
|
||||
'https://api.github.com/repos/freecodecamp/',
|
||||
'freecodecamp/issues?client_id=',
|
||||
@ -344,7 +344,7 @@ module.exports = function(app) {
|
||||
issues = ((pulls === parseInt(pulls, 10)) && issues) ?
|
||||
Object.keys(JSON.parse(issues)).length - pulls :
|
||||
"Can't connect to GitHub";
|
||||
res.send({
|
||||
return res.send({
|
||||
issues: issues,
|
||||
pulls: pulls
|
||||
});
|
||||
@ -364,7 +364,7 @@ module.exports = function(app) {
|
||||
(JSON.parse(trello)) :
|
||||
'Can\'t connect to to Trello';
|
||||
|
||||
res.end(JSON.stringify(trello));
|
||||
return res.end(JSON.stringify(trello));
|
||||
});
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ module.exports = function(app) {
|
||||
blog = (status && status.statusCode === 200) ?
|
||||
JSON.parse(blog) :
|
||||
'Can\'t connect to Blogger';
|
||||
res.end(JSON.stringify(blog));
|
||||
return res.end(JSON.stringify(blog));
|
||||
}
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user