From 166e1fd753721000b6064e243e547a5b2f58ff05 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Thu, 18 Apr 2024 23:03:15 +0800 Subject: [PATCH] fix(route/reuters): Using `by topic` fetching method for `tags`, (#15285) --- lib/routes/reuters/common.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.ts index e1b4e3f25..f376dabcf 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.ts @@ -64,13 +64,13 @@ export const route: Route = { }; async function handler(ctx) { - const MUST_FETCH_BY_TOPICS = new Set(['authors']); + const MUST_FETCH_BY_TOPICS = new Set(['authors', 'tags']); const CAN_USE_SOPHI = ['world']; const category = ctx.req.param('category'); const topic = ctx.req.param('topic') ?? (category === 'authors' ? 'reuters' : ''); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; - const useSophi = ctx.req.query('sophi') === 'true' && 'topic' !== '' && CAN_USE_SOPHI.includes(category); + const useSophi = ctx.req.query('sophi') === 'true' && topic !== '' && CAN_USE_SOPHI.includes(category); const section_id = `/${category}/${topic ? `${topic}/` : ''}`; const { title, description, rootUrl, response } = await (async () => {