Skip to content

Commit

Permalink
Update mongoose dependency to 8.x
Browse files Browse the repository at this point in the history
-A couple small fixes were applied to the database.js to change the alias of findOneAndRemove to findOneAndDelete to fix breaking changes
  • Loading branch information
joeuhren committed Dec 28, 2023
1 parent accf9a9 commit ed8d7a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('');
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ed8d7a5

Please sign in to comment.