From 096edd553b81cbd121342af13f69ac3e311e3492 Mon Sep 17 00:00:00 2001 From: terakilobyte Date: Fri, 24 Apr 2015 15:53:22 -0400 Subject: [PATCH] Factor out $('title') to a re-usable variable to make the linter happy and remove old database lookup based on old challenge architecture. --- controllers/resources.js | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/controllers/resources.js b/controllers/resources.js index be29c7145a..a9edf03480 100644 --- a/controllers/resources.js +++ b/controllers/resources.js @@ -8,7 +8,6 @@ var async = require('async'), Nonprofit = require('./../models/Nonprofit'), Comment = require('./../models/Comment'), resources = require('./resources.json'), - steps = resources.steps, secrets = require('./../config/secrets'), bonfires = require('../seed_data/bonfires.json'), nonprofits = require('../seed_data/nonprofits.json'), @@ -186,19 +185,11 @@ module.exports = { return next(err); } - // todo is this necessary anymore? - User.count({'points': {'$gt': 53}}, function (err, all) { - if (err) { - debug('User err: ', err); - return next(err); - } - - res.render('resources/learn-to-code', { - title: 'About Free Code Camp', - daysRunning: daysRunning, - c3: numberWithCommas(c3), - announcements: announcements - }); + res.render('resources/learn-to-code', { + title: 'About Free Code Camp', + daysRunning: daysRunning, + c3: numberWithCommas(c3), + announcements: announcements }); }); },