fix(routes/landiannews): fix _embed search params (#19710)

This commit is contained in:
Cason Kervis
2025-07-29 10:15:10 +08:00
committed by GitHub
parent b7acbafaa3
commit 4f79cc1c2a
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ export const handler = async (ctx): Promise<Data> => {
const { id, name } = await fetchCategory(slug);
const rootUrl = 'https://www.landiannews.com/';
const postApiUrl = `${rootUrl}wp-json/wp/v2/posts?_embed&categories=${id}`;
const postApiUrl = `${rootUrl}wp-json/wp/v2/posts?_embed=author,wp:term&categories=${id}`;
const items: DataItem[] = await fetchNewsItems(postApiUrl);
+1 -1
View File
@@ -3,7 +3,7 @@ import { fetchNewsItems } from './utils';
export const handler = async (): Promise<Data> => {
const rootUrl = 'https://www.landiannews.com/';
const postApiUrl = `${rootUrl}wp-json/wp/v2/posts?_embed`;
const postApiUrl = `${rootUrl}wp-json/wp/v2/posts?_embed=author,wp:term`;
const items: DataItem[] = await fetchNewsItems(postApiUrl);
+1 -1
View File
@@ -7,7 +7,7 @@ export const handler = async (ctx): Promise<Data> => {
const { id, name } = await fetchTag(slug);
const rootUrl = 'https://www.landiannews.com/';
const postApiUrl = `${rootUrl}wp-json/wp/v2/posts?_embed&tags=${id}`;
const postApiUrl = `${rootUrl}wp-json/wp/v2/posts?_embed=author,wp:term&tags=${id}`;
const items: DataItem[] = await fetchNewsItems(postApiUrl);