Fix all collection.count is deprecated warnings
This commit is contained in:
+2
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user