From e8f6b797a1a5998f87bddae2d34adc0869dd18e9 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 20 Sep 2024 10:10:17 +0200 Subject: [PATCH 1/4] replace deprecated method save to insertOne --- lib/models/rulesStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/rulesStore.js b/lib/models/rulesStore.js index 2926f2b9..0ca340d6 100644 --- a/lib/models/rulesStore.js +++ b/lib/models/rulesStore.js @@ -172,7 +172,7 @@ module.exports = { [ db.collection.bind(db, rulesCollectionName, { strict: true }), function(col, cb) { - col.save(r, cb); + col.insertOne(r, cb); } ], function(err, result) { From 41fb9fd1dd69cd0b6bbd1ba1c0c4347b0369eca2 Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 20 Sep 2024 13:00:55 +0200 Subject: [PATCH 2/4] Update rulesStore.js --- lib/models/rulesStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/rulesStore.js b/lib/models/rulesStore.js index 0ca340d6..1c3134fd 100644 --- a/lib/models/rulesStore.js +++ b/lib/models/rulesStore.js @@ -155,7 +155,7 @@ module.exports = { [ db.collection.bind(db, rulesCollectionName, { strict: true }), function(col, cb) { - col.remove({ name: rule.name, subservice: rule.subservice, service: rule.service }, cb); + col.deleteOne({ name: rule.name, subservice: rule.subservice, service: rule.service }, cb); } ], function(err, result) { From 811478bb5772b13e4502892b890d83b2e54e031f Mon Sep 17 00:00:00 2001 From: Alvaro Vega Date: Fri, 20 Sep 2024 13:04:49 +0200 Subject: [PATCH 3/4] Update CHANGES_NEXT_RELEASE --- CHANGES_NEXT_RELEASE | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 267d2503..53d3b67f 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,2 +1,3 @@ +- Fix deprecated mongo warnings about save and remove methods (#806) - Upgrade express from 4.19.2 to 4.20.0 - Upgrade body-parser dep from 1.18.2 to 1.20.3 From da9ce523dfc3fe381b2a6e08fa2525bc995bb199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferm=C3=ADn=20Gal=C3=A1n=20M=C3=A1rquez?= Date: Tue, 24 Sep 2024 09:17:44 +0200 Subject: [PATCH 4/4] Update CHANGES_NEXT_RELEASE --- CHANGES_NEXT_RELEASE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 53d3b67f..969251fd 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,3 +1,3 @@ -- Fix deprecated mongo warnings about save and remove methods (#806) +- Fix: deprecated mongo warnings about save and remove methods (#806) - Upgrade express from 4.19.2 to 4.20.0 - Upgrade body-parser dep from 1.18.2 to 1.20.3