mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
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:
@@ -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();
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user