Resolve merge conflict, using ziplines changes

This commit is contained in:
Nathan Leniz
2015-03-28 12:16:42 +09:00
18 changed files with 229 additions and 728 deletions

View File

@ -171,7 +171,7 @@ module.exports = {
var date1 = new Date('10/15/2014');
var date2 = new Date();
var progressTimestamps = req.user.progressTimestamps;
var now = Date.now() / 1000 | 0;
var now = Date.now() || 0;
if (req.user.pointsNeedMigration) {
var challengesHash = req.user.challengesHash;
for (var key in challengesHash) {
@ -183,7 +183,8 @@ module.exports = {
var timeStamps = [];
R.keys(req.user.challengesHash).forEach(function(key) {
"use strict";
timeStamps.push({timeStamp: challengesHash[key]});
var timeStamp = parseInt(challengesHash[key], 10);
timeStamps.push({timeStamp: timeStamp.length !== 13 ? (+timeStamp) : (+timeStamp * 1000)});
});
req.user.completedCoursewares = Array.zip(timeStamps, coursewares,
@ -321,7 +322,6 @@ module.exports = {
return process.env.NODE_ENV;
},
getURLTitle: function(url, callback) {
debug('got url in meta scraping function', url);
(function () {
var result = {title: '', image: '', url: '', description: ''};
request(url, function (error, response, body) {