mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 07:07:13 +02:00
committed by
GitHub
parent
856ba78a5f
commit
0ce4b87d85
@@ -41,7 +41,11 @@ module.exports = function (module) {
|
||||
return;
|
||||
}
|
||||
const batch = module.client.batch();
|
||||
keys.forEach((k, i) => batch.hmset(k, data[i]));
|
||||
keys.forEach((k, i) => {
|
||||
if (Object.keys(data[i]).length) {
|
||||
batch.hmset(k, data[i]);
|
||||
}
|
||||
});
|
||||
await helpers.execBatch(batch);
|
||||
cache.del(keys);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user