mirror of
https://github.com/vega-org/vega-providers.git
synced 2026-04-17 23:51:44 +00:00
fix: Update getSearchPosts URL construction for pagination
This commit is contained in:
@@ -33,7 +33,11 @@ export const getSearchPosts = async function ({
|
||||
}): Promise<Post[]> {
|
||||
const { getBaseUrl, cheerio } = providerContext;
|
||||
const baseUrl = await getBaseUrl("4khdhub");
|
||||
const url = `${baseUrl}/page/${page}?s=${searchQuery}`;
|
||||
const url =
|
||||
page == 1
|
||||
? `${baseUrl}/?s=${searchQuery}`
|
||||
: `${baseUrl}/page/${page}?s=${searchQuery}`;
|
||||
console.log("4khdhubGetSearchPosts url", url);
|
||||
return posts({ url, signal, cheerio });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user