mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 21:30:30 +01:00
fix: numThumb upgrade script
This commit is contained in:
@@ -13,7 +13,7 @@ module.exports = {
|
||||
await batch.processSortedSet('topics:tid', async (tids) => {
|
||||
const keys = tids.map(tid => `topic:${tid}:thumbs`);
|
||||
const counts = await db.sortedSetsCard(keys);
|
||||
const tidToCount = _.zip(tids, counts);
|
||||
const tidToCount = _.zipObject(tids, counts);
|
||||
const tidsWithThumbs = tids.filter((t, i) => counts[i] > 0);
|
||||
await db.setObjectBulk(
|
||||
tidsWithThumbs.map(tid => `topic:${tid}`),
|
||||
|
||||
Reference in New Issue
Block a user