diff --git a/modules/apis/repositories/apis.repository.js b/modules/apis/repositories/apis.repository.js index 5d50516c..1cc2ebcc 100644 --- a/modules/apis/repositories/apis.repository.js +++ b/modules/apis/repositories/apis.repository.js @@ -95,7 +95,7 @@ exports.historize = (api, history) => Api.updateOne( * @desc Function to get collection stats * @return {Object} scrap */ -exports.stats = () => Api.count(); +exports.stats = () => Api.countDocuments(); /** * @desc Function to insert list of data in db diff --git a/modules/historys/repositories/historys.repository.js b/modules/historys/repositories/historys.repository.js index 20a5fcda..fad40c33 100644 --- a/modules/historys/repositories/historys.repository.js +++ b/modules/historys/repositories/historys.repository.js @@ -38,4 +38,4 @@ exports.get = (id) => { * @desc Function to get collection stats * @return {Object} scrap */ -exports.stats = () => History.count(); +exports.stats = () => History.countDocuments();