From dfef12524c24483bd75d03cf54985364965459db Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Fri, 26 Jan 2024 03:23:16 +0800 Subject: [PATCH] fix(route): Foresight News column (#14322) --- lib/v2/foresightnews/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v2/foresightnews/util.js b/lib/v2/foresightnews/util.js index 528a804d50..9d1d69bdeb 100644 --- a/lib/v2/foresightnews/util.js +++ b/lib/v2/foresightnews/util.js @@ -47,7 +47,7 @@ const processItems = async (apiUrl, limit, ...searchParams) => { let items = JSON.parse(String(zlib.inflateSync(Buffer.from(response.data?.list ?? response.data, 'base64')))); items = (items?.list ?? items).slice(0, limit).map((item) => { - const sourceType = item.source_type ?? (item.source_link ? 'news' : item.event_type ? 'event' : constants.defaultType); + const sourceType = item.source_type ?? (item.source_link ? (item.column?.title ? 'article' : 'news') : item.event_type ? 'event' : constants.defaultType); item = item.source_type ? item[item.source_type] : item;