update camper news and chat challenges to have new videos and updated copy

This commit is contained in:
Michael Q Larson
2015-04-09 12:58:30 -07:00
parent 6deb527e98
commit 62cabd56ff
4 changed files with 36 additions and 48 deletions

View File

@@ -29,22 +29,6 @@ exports.returnNextChallenge = function(req, res) {
exports.returnChallenge = function(req, res, next) {
var challengeNumber = parseInt(req.params.challengeNumber) || 0;
if (challengeNumber === 2) {
req.user.challengesHash[challengeNumber] = Math.round(+new Date() / 1000);
var timestamp = req.user.challengesHash;
var points = 0;
for (var key in timestamp) {
if (timestamp[key] > 0 && req.body.challengeNumber < 54) {
points += 1;
}
}
req.user.points = points;
req.user.save(function(err) {
if (err) { return done(err); }
});
return res.redirect('../challenges/3');
}
if (challengeNumber > highestChallengeNumber) {
req.flash('errors', {