chore(server): update loopback-connector-mogodb

This commit is contained in:
ValeraS
2018-10-08 13:00:29 +03:00
committed by Stuart Taylor
parent a426d85c81
commit 27cbcb8e9a
4 changed files with 115 additions and 87 deletions

View File

@ -62,7 +62,7 @@ PassportConfigurator.prototype.init = function passportInit(noSession) {
.aggregate([
{ $match: { _id: user.id } },
{ $project: { points: { $size: '$progressTimestamps' } } }
], function(err, [{ points = 1 } = {}]) {
]).get(function(err, [{ points = 1 } = {}]) {
if (err) { console.error(err); return done(err); }
user.points = points;
let completedChallengeCount = 0;