fix: topic count on category page if filter is author

v1.18.x
Barış Soner Uşaklı 4 years ago
parent 9a7c3c689f
commit bbf6889ecc

@ -86,6 +86,8 @@ module.exports = function (Categories) {
const set = await Categories.buildTopicsSortedSet(data); const set = await Categories.buildTopicsSortedSet(data);
if (Array.isArray(set)) { if (Array.isArray(set)) {
return await db.sortedSetIntersectCard(set); return await db.sortedSetIntersectCard(set);
} else if (data.targetUid && set) {
return await db.sortedSetCard(set);
} }
return data.category.topic_count; return data.category.topic_count;
}; };

Loading…
Cancel
Save