Sort aggregation

This commit is contained in:
Chi Vinh Le
2017-08-07 18:12:25 +07:00
parent c2f8f41e59
commit 1d5f1e676f
+2 -1
View File
@@ -173,7 +173,8 @@ module.exports = class ActionsService {
return ActionModel.aggregate([
{$match},
{$group},
{$project}
{$project},
{$sort: {count: -1, action_type: 1, group_id: 1}},
]);
}