From dd15065706c12d533756916fce2a7db574076b27 Mon Sep 17 00:00:00 2001 From: "SAES:RPG" <46712840+saesrpg@users.noreply.github.com> Date: Thu, 26 Aug 2021 14:44:16 +0100 Subject: [PATCH] Fix [MONGODB DRIVER] Warning: bulk operation `remove` has been deprecated, please use `delete` (#9746) Co-authored-by: Brophy --- src/database/mongo/sorted/remove.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/mongo/sorted/remove.js b/src/database/mongo/sorted/remove.js index aecb137c12..d6bf96fa7e 100644 --- a/src/database/mongo/sorted/remove.js +++ b/src/database/mongo/sorted/remove.js @@ -57,7 +57,7 @@ module.exports = function (module) { return; } const bulk = module.client.collection('objects').initializeUnorderedBulkOp(); - data.forEach(item => bulk.find({ _key: item[0], value: String(item[1]) }).remove()); + data.forEach(item => bulk.find({ _key: item[0], value: String(item[1]) }).delete()); await bulk.execute(); }; };