Fix all collection.count is deprecated warnings

This commit is contained in:
joeuhren
2020-11-28 14:44:42 -07:00
parent 7982491ab8
commit e7ce0cef27
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -394,7 +394,7 @@ module.exports = {
},
get_last_txs_ajax: function(start, length, min, cb) {
Tx.find({'total': {$gte: min}}).count(function(err, count){
Tx.find({'total': {$gte: min}}).countDocuments(function(err, count){
Tx.find({'total': {$gte: min}}).sort({blockindex: -1}).skip(Number(start)).limit(Number(length)).exec(function(err, txs){
if (err) {
return cb(err);
@@ -407,7 +407,7 @@ module.exports = {
get_address_txs_ajax: function(hash, start, length, cb) {
var totalCount = 0;
AddressTx.find({a_id: hash}).count(function(err, count){
AddressTx.find({a_id: hash}).countDocuments(function(err, count){
if(err) {
return cb(err);
} else {