From 0f0dcf470a7a7ffbb565d67f95f11616665b03f3 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 10 Sep 2022 01:24:45 +0700 Subject: [PATCH] fix(route): hjedd cache key (#10753) --- lib/v2/hjedd/utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/v2/hjedd/utils.js b/lib/v2/hjedd/utils.js index 4b69fae86..0f5f8425f 100644 --- a/lib/v2/hjedd/utils.js +++ b/lib/v2/hjedd/utils.js @@ -47,7 +47,7 @@ module.exports = { url: apiUrl, }); - const list = response.data.data.results.slice(0, limit ? parseInt(limit) : 5).map((item) => ({ + const list = response.data.data.results.slice(0, limit ? parseInt(limit) : 20).map((item) => ({ guid: item.topicId, title: item.title, link: `${rootUrl}/post/details?pid=${item.topicId}`, @@ -72,7 +72,7 @@ module.exports = { const attachments = detailResponse.data.data.attachments ?? []; for await (const attachment of asyncPool(5, attachments, (attachment) => - tryGet(attachment.id, async () => { + tryGet(attachment.remoteUrl, async () => { const attachmentResponse = await got({ method: 'get', url: attachment.coverUrl ?? attachment.remoteUrl,