Skip to content

Node.js based forum software built for the modern web

feat: log data on error

Barış Soner Uşaklıf8a7cf737875
diff --git a/src/database/mongo/sorted/add.js b/src/database/mongo/sorted/add.js
index 61c03602f6..eb08de712d 100644
--- a/src/database/mongo/sorted/add.js
+++ b/src/database/mongo/sorted/add.js
@@ -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);
+ });
};
};