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

@ -25,7 +25,7 @@ export default function populateUser(db, user) {
.aggregate([
{ $match: { _id: user.id } },
{ $project: { points: { $size: '$progressTimestamps' } } }
], function(err, [{ points = 1 } = {}]) {
]).get(function(err, [{ points = 1 } = {}]) {
if (err) { return reject(err); }
user.points = points;
let completedChallengeCount = 0;