@go-mailer/jarvis 3.2.8 → 3.2.9
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/lib/query.js +1 -13
- package/package.json +1 -1
package/lib/query.js
CHANGED
|
@@ -135,7 +135,7 @@ const determinePagination = (page = 0, population) => {
|
|
|
135
135
|
return pagination
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
const generateGroupPipeline = ({ group_by, seek_conditions, sort_condition,
|
|
138
|
+
const generateGroupPipeline = ({ group_by, seek_conditions, sort_condition, fields_to_return, count }) => {
|
|
139
139
|
if (!group_by || typeof group_by !== 'string') return null
|
|
140
140
|
|
|
141
141
|
const pipeline = []
|
|
@@ -145,18 +145,6 @@ const generateGroupPipeline = ({ group_by, seek_conditions, sort_condition, skip
|
|
|
145
145
|
$match: { ...seek_conditions }
|
|
146
146
|
})
|
|
147
147
|
|
|
148
|
-
if (skip) {
|
|
149
|
-
pipeline.push({
|
|
150
|
-
$skip: { skip }
|
|
151
|
-
})
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (limit) {
|
|
155
|
-
pipeline.push({
|
|
156
|
-
$limit: { limit: Math.floor(limit) }
|
|
157
|
-
})
|
|
158
|
-
}
|
|
159
|
-
|
|
160
148
|
if (sort_condition){
|
|
161
149
|
const sort_options = sort_condition.split(' ').reduce((sac, condition) => {
|
|
162
150
|
let key = condition
|