adminmate-express-mongoose 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminmate-express-mongoose",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Adminmate Express/Mongoose connector",
5
5
  "author": "Marc Delalonde",
6
6
  "homepage": "http://adminmate.io",
@@ -67,18 +67,18 @@ module.exports = _conf => {
67
67
  count: data.operation === 'avg' ? { $avg: _value } : { $sum: _value },
68
68
  }
69
69
  },
70
+ {
71
+ $sort: { count: -1 }
72
+ },
73
+ {
74
+ $limit: limit
75
+ },
70
76
  {
71
77
  $project: {
72
78
  key: '$_id',
73
79
  value: '$count',
74
80
  _id: false
75
81
  }
76
- },
77
- {
78
- $sort: { count: -1 }
79
- },
80
- {
81
- $limit: limit
82
82
  }
83
83
  ]);
84
84
  // .limit(limit)