From 9df813ab77377ec9a9acf01622922b59dd2d2e44 Mon Sep 17 00:00:00 2001 From: joeuhren <46763106+joeuhren@users.noreply.github.com> Date: Fri, 20 Nov 2020 18:45:01 -0700 Subject: [PATCH] Another mongoose deprecated .update() fix --- lib/database.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/database.js b/lib/database.js index 67e9121..eb49ad8 100644 --- a/lib/database.js +++ b/lib/database.js @@ -882,7 +882,7 @@ module.exports = { }); }, function(){ Tx.find({}).sort({timestamp: 'desc'}).limit(settings.index.last_txs).exec(function(err, txs){ - Stats.update({coin: coin}, { + Stats.updateOne({coin: coin}, { last: end, last_txs: '' //not used anymore left to clear out existing objects }, function() {