refactor: setObjectBulk to match sortedSetAddBulk

This commit is contained in:
Barış Soner Uşaklı
2021-11-12 19:51:59 -05:00
parent 1a85aaad23
commit 8379c11b22
13 changed files with 75 additions and 82 deletions

View File

@@ -121,8 +121,7 @@ module.exports = function (Categories) {
);
await db.setObjectBulk(
childrenCids.map(cid => `category:${cid}`),
childrenCids.map((cid, index) => ({ order: index + 1 }))
childrenCids.map((cid, index) => [`category:${cid}`, { order: index + 1 }])
);
cache.del([