From fa5e993d1ae2e009a2c981da47949b0ef71fe1ff Mon Sep 17 00:00:00 2001 From: hoilc Date: Tue, 23 Feb 2021 08:01:32 +0800 Subject: [PATCH] fix(route): xiaoheihe news duplicate entries (#6992) --- lib/routes/xiaoheihe/news.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/xiaoheihe/news.js b/lib/routes/xiaoheihe/news.js index a00a6730b..7299a41ac 100644 --- a/lib/routes/xiaoheihe/news.js +++ b/lib/routes/xiaoheihe/news.js @@ -17,7 +17,8 @@ module.exports = async (ctx) => { const news = { title: item.title, pubDate: item.data, - link: item.newUrl, + link: `https://api.xiaoheihe.cn/maxnews/app/share/detail/${newsId}`, + guid: cacheKey, }; // 判断缓存中是否存在 @@ -38,7 +39,6 @@ module.exports = async (ctx) => { // 存放到缓存区 ctx.cache.set(cacheKey, content); news.description = content; - news.link = `https://api.xiaoheihe.cn/maxnews/app/share/detail/${newsId}`; } return Promise.resolve(news);