From 9780b3ed0262b6d41139dd7ac2c3eef9534a2bac Mon Sep 17 00:00:00 2001 From: Enoch Ma Date: Fri, 20 Mar 2026 05:50:04 +0200 Subject: [PATCH] fix(route/nautil): change url (#21452) --- lib/routes/nautil/topics.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/nautil/topics.tsx b/lib/routes/nautil/topics.tsx index 1a82a2db7..e135f8be4 100644 --- a/lib/routes/nautil/topics.tsx +++ b/lib/routes/nautil/topics.tsx @@ -8,6 +8,7 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; const baseUrl = 'https://nautil.us'; +const apiUrl = 'https://lede-admin.nautil.us'; export const route: Route = { path: '/topic/:tid', @@ -35,7 +36,7 @@ export const route: Route = { async function handler(ctx) { const categoryIdMap = await cache.tryGet('nautil:categories', async () => { - const { data } = await got(`${baseUrl}/wp-json/wp/v2/categories`, { + const { data } = await got(`${apiUrl}/wp-json/wp/v2/categories`, { searchParams: { per_page: 100, }, @@ -47,7 +48,7 @@ async function handler(ctx) { })); }); - const { data: list } = await got(`${baseUrl}/wp-json/wp/v2/posts`, { + const { data: list } = await got(`${apiUrl}/wp-json/wp/v2/posts`, { searchParams: { categories: categoryIdMap.find((item) => item.slug === ctx.req.param('tid').toLowerCase()).id, per_page: ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20,