mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: log data on error
This commit is contained in:
@@ -83,6 +83,11 @@ module.exports = function (db, module) {
|
||||
data.forEach(function (item) {
|
||||
bulk.find({ _key: item[0], value: String(item[2]) }).upsert().updateOne({ $set: { score: parseFloat(item[1]) } });
|
||||
});
|
||||
bulk.execute(err => callback(err));
|
||||
bulk.execute(function (err) {
|
||||
if (err) {
|
||||
console.log(data);
|
||||
}
|
||||
callback(err);
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user