Fix [MONGODB DRIVER] Warning: bulk operation remove has been deprecated, please use delete (#9746)

Co-authored-by: Brophy <paul.brophy@bastage.net>
This commit is contained in:
SAES:RPG
2021-08-26 14:44:16 +01:00
committed by GitHub
parent fac8136f9b
commit dd15065706

View File

@@ -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();
};
};