This commit is contained in:
Barış Soner Uşaklı
2018-05-10 16:31:16 -04:00
parent 91e6f79f08
commit 3b5d6951bb
8 changed files with 16 additions and 14 deletions

View File

@@ -179,7 +179,7 @@ module.exports = function (db, module) {
{ $group: { _id: { _key: '$_key' }, count: { $sum: 1 } } },
{ $project: { _id: 1, count: '$count' } },
];
db.collection('objects').aggregate(pipeline, function (err, results) {
db.collection('objects').aggregate(pipeline).toArray(function (err, results) {
if (err) {
return callback(err);
}