@rws-framework/db 2.2.6 → 2.2.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.
@@ -140,7 +140,7 @@ class DBService {
140
140
  }
141
141
  if (pagination) {
142
142
  const perPage = pagination.per_page || 50;
143
- params.skip = pagination.page * perPage;
143
+ params.skip = (pagination.page || 0) * perPage;
144
144
  params.take = perPage;
145
145
  }
146
146
  const retData = await this.getCollectionHandler(collection).findMany(params);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rws-framework/db",
3
3
  "private": false,
4
- "version": "2.2.6",
4
+ "version": "2.2.7",
5
5
  "description": "",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -197,7 +197,7 @@ class DBService {
197
197
 
198
198
  if(pagination){
199
199
  const perPage = pagination.per_page || 50;
200
- params.skip = pagination.page * perPage;
200
+ params.skip = (pagination.page || 0) * perPage;
201
201
  params.take = perPage;
202
202
  }
203
203