fix: update x-mol paper image url (#4256)

This commit is contained in:
Yunqi Shao
2020-03-17 12:08:06 +08:00
committed by GitHub
parent 4fcbecc94d
commit f4b2917056
+3 -2
View File
@@ -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,
}),