Migration script written.
This commit is contained in:
@@ -333,18 +333,6 @@ exports.returnUser = function(req, res, next) {
|
||||
data[(timeStamp / 1000)] = 1;
|
||||
});
|
||||
|
||||
if (!user.needsMigration) {
|
||||
var currentlySolvedBonfires = user.completedBonfires;
|
||||
user.completedBonfires =
|
||||
resources.ensureBonfireNames(currentlySolvedBonfires);
|
||||
user.needsMigration = true;
|
||||
user.save(function(err) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
user.currentStreak = user.currentStreak || 1;
|
||||
user.longestStreak = user.longestStreak || 1;
|
||||
var challenges = user.completedCoursewares.filter(function ( obj ) {
|
||||
|
Reference in New Issue
Block a user