diff --git a/service/database/index.js b/service/database/index.js index 377492a..8692d7b 100644 --- a/service/database/index.js +++ b/service/database/index.js @@ -26,6 +26,7 @@ class Mongo { const collection = getConnection(database).collection(collectionName); let { _page = 0, _pageSize = 1000, ...filterQuery } = query; const _skip = _page * _pageSize; + _pageSize = parseInt(_pageSize, 10); const data = await collection.find(filterQuery).skip(_skip).limit(_pageSize).toArray(); /** allow caller method to toggle response transformation */