From 6c037dd734e5b94cebc9c9ba445fe65733efe3fc Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Thu, 4 Jun 2026 21:15:03 +0800 Subject: [PATCH] fix(route/apnews): Change default path for mobile API (#22105) * fix(route/apnews): Change default path for mobile API * Update mobile-api.ts * Update mobile-api.ts --- lib/routes/apnews/mobile-api.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/apnews/mobile-api.ts b/lib/routes/apnews/mobile-api.ts index 3c894ca3a..ac182d98c 100644 --- a/lib/routes/apnews/mobile-api.ts +++ b/lib/routes/apnews/mobile-api.ts @@ -10,12 +10,12 @@ import { fetchArticle } from './utils'; export const route: Route = { path: '/mobile/:path{.+}?', categories: ['traditional-media'], - example: '/apnews/mobile/ap-top-news', + example: '/apnews/mobile', view: ViewType.Articles, parameters: { path: { description: 'Corresponding path from AP News website', - default: 'ap-top-news', + default: '/', }, }, features: { @@ -37,7 +37,7 @@ export const route: Route = { }; async function handler(ctx) { - const path = ctx.req.param('path') ? `/${ctx.req.param('path')}` : '/hub/ap-top-news'; + const path = ctx.req.param('path') ? `/${ctx.req.param('path')}` : '/'; const apiRootUrl = 'https://apnews.com/graphql/delivery/ap/v1'; const res = await ofetch(apiRootUrl, { query: {