From e5a997c82410f7454e238de7cb59bf139075acda Mon Sep 17 00:00:00 2001 From: Tony Date: Wed, 12 Oct 2022 18:14:56 +0400 Subject: [PATCH] fix(route): lkong (#11072) --- docs/bbs.md | 2 +- lib/v2/lkong/forum.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/bbs.md b/docs/bbs.md index 0e98eb3af..33e4342a0 100644 --- a/docs/bbs.md +++ b/docs/bbs.md @@ -718,7 +718,7 @@ pageClass: routes ### 帖子 - + ## 龙腾网 diff --git a/lib/v2/lkong/forum.js b/lib/v2/lkong/forum.js index 4095d64df..169decc9b 100644 --- a/lib/v2/lkong/forum.js +++ b/lib/v2/lkong/forum.js @@ -34,11 +34,12 @@ module.exports = async (ctx) => { json: viewThread(item.guid, 1), }); - item.author = detailResponse.data.data.thread.author.name; - item.pubDate = parseDate(detailResponse.data.data.thread.dateline); + item.author = detailResponse.data.data.thread?.author.name; + item.pubDate = parseDate(detailResponse.data.data.thread?.dateline); item.description = art(path.join(__dirname, 'templates/content.art'), { content: JSON.parse(detailResponse.data.data.posts[0].content), }); + delete item.guid; return item; })