fix(routes/landiannews): fix _embed search params (#19710)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user