@go-mailer/jarvis 3.2.8 → 3.2.10

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.
Files changed (2) hide show
  1. package/lib/query.js +2 -14
  2. package/package.json +1 -1
package/lib/query.js CHANGED
@@ -125,7 +125,7 @@ const buildWildcardOptions = (key_list, value) => {
125
125
 
126
126
  const determinePagination = (page = 0, population) => {
127
127
  const pagination = {
128
- skip: population ? skip * population : skip
128
+ skip: population ? page * population : page
129
129
  }
130
130
 
131
131
  if (population) {
@@ -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, skip, limit, fields_to_return, count }) => {
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mailer/jarvis",
3
- "version": "3.2.8",
3
+ "version": "3.2.10",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:go-mailer-ltd/jarvis-node.git",
6
6
  "author": "Nathan Oguntuberu <nateoguns.work@gmail.com>",