mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
refactor: use getSortedSetMembers
This commit is contained in:
@@ -177,7 +177,7 @@ module.exports = function (Topics) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getFollowedTids(params) {
|
async function getFollowedTids(params) {
|
||||||
let tids = (await db.getSortedSetsMembers(['uid:' + params.uid + ':followed_tids']))[0];
|
let tids = await db.getSortedSetMembers('uid:' + params.uid + ':followed_tids');
|
||||||
const filterCids = params.cid && params.cid.map(cid => parseInt(cid, 10));
|
const filterCids = params.cid && params.cid.map(cid => parseInt(cid, 10));
|
||||||
if (filterCids) {
|
if (filterCids) {
|
||||||
const topicData = await Topics.getTopicsFields(tids, ['tid', 'cid']);
|
const topicData = await Topics.getTopicsFields(tids, ['tid', 'cid']);
|
||||||
|
|||||||
Reference in New Issue
Block a user