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

Co-authored-by: Brophy <paul.brophy@bastage.net>
isekai-main
SAES:RPG 3 years ago committed by GitHub
parent fac8136f9b
commit dd15065706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save