c2-mongoose 2.1.36 → 2.1.37

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.
@@ -232,7 +232,9 @@ var SearchFlow = /** @class */ (function () {
232
232
  },
233
233
  {
234
234
  $sort: sort
235
- }
235
+ },
236
+ { $skip: (this.page - 1) * this.limit },
237
+ { $limit: this.limit }
236
238
  ]).session(session)];
237
239
  case 1:
238
240
  ret = _a.sent();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-mongoose",
3
- "version": "2.1.36",
3
+ "version": "2.1.37",
4
4
  "description": "Lib to make any search in database mongoose and use as basic crud",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -151,7 +151,9 @@ abstract class SearchFlow {
151
151
  },
152
152
  {
153
153
  $sort: sort
154
- }
154
+ },
155
+ { $skip: (this.page - 1) * this.limit },
156
+ { $limit: this.limit }
155
157
  ]
156
158
  ).session(session!)
157
159
  return ret