From f4b2917056ab0c291ca6daa4e65ba5d214cb51ab Mon Sep 17 00:00:00 2001 From: Yunqi Shao Date: Tue, 17 Mar 2020 05:08:06 +0100 Subject: [PATCH] fix: update x-mol paper image url (#4256) --- lib/routes/x-mol/paper.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/x-mol/paper.js b/lib/routes/x-mol/paper.js index cf4f25570a..232bc8f177 100644 --- a/lib/routes/x-mol/paper.js +++ b/lib/routes/x-mol/paper.js @@ -35,10 +35,11 @@ module.exports = async (ctx) => { let imageUrl = noPic; if (picId) { const imageId = picId.substring(9); - const getLink = utils.host + '/attachment/getImgUrl'; + const getLink = utils.host + '/attachment/getPaperImgUrl'; imageUrl = - (await ctx.cache.tryGet(getLink, async () => { + (await ctx.cache.tryGet(getLink + imageId, async () => { const result = await got.get(getLink, { + headers: { 'X-Requested-With': 'XMLHttpRequest' }, searchParams: queryString.stringify({ attachmentId: imageId, }),