From edf67f349f9871f8abff34f6332fa33df1881413 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 9 Dec 2020 17:12:59 -0500 Subject: [PATCH] fix: use getSortedSetRange instead of getSortedSetsMembers --- src/topics/thumbs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/topics/thumbs.js b/src/topics/thumbs.js index ab7532dd4d..09c60f77e4 100644 --- a/src/topics/thumbs.js +++ b/src/topics/thumbs.js @@ -28,7 +28,7 @@ Thumbs.get = async function (tids) { } const sets = tids.map(tid => `${validator.isUUID(String(tid)) ? 'draft' : 'topic'}:${tid}:thumbs`); - const thumbs = await db.getSortedSetsMembers(sets); + const thumbs = await Promise.all(sets.map(async set => db.getSortedSetRange(set, 0, -1))); let response = thumbs.map((thumbSet, idx) => thumbSet.map(thumb => ({ id: tids[idx], name: path.basename(thumb),