diff --git a/lib/database.js b/lib/database.js index cd63e670..d03888ad 100644 --- a/lib/database.js +++ b/lib/database.js @@ -460,7 +460,7 @@ module.exports = { // check if the claim name is being removed if (claim_name == null || claim_name == '') { // remove the claim name - ClaimAddress.findOneAndRemove({a_id: hash}).then(() => { + ClaimAddress.findOneAndDelete({a_id: hash}).then(() => { // run processes after the claim name has been updated after_update_claim_name(hash, claim_name, function() { return cb(''); @@ -1045,7 +1045,7 @@ module.exports = { // drops richlist data for given coin delete_richlist: function(coin, cb) { - Richlist.findOneAndRemove({coin: coin}).then((exists) => { + Richlist.findOneAndDelete({coin: coin}).then((exists) => { if (exists) return cb(true); else diff --git a/package.json b/package.json index a9f30b0f..1aaf5e36 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "intl": "^1.2.5", "jsonminify": "^0.4.2", "mongodb": "^6.1.0", - "mongoose": "^7.1.0", + "mongoose": "^8.0.3", "morgan": ">=1.10.0", "postman-request": "^2.88.1-postman.31", "pug": "~3.0.2",