mirror of
https://github.com/vercel/commerce.git
synced 2025-05-14 21:47:51 +00:00
feat(poc): test something
This commit is contained in:
parent
cc07397793
commit
2ee6394d27
@ -169,6 +169,7 @@ export async function requestSeoUrl(
|
||||
limit: number = 1
|
||||
): Promise<SeoURLResultSW | undefined> {
|
||||
try {
|
||||
const testing = handle.replace('cms/', '').replace('product/', '').replace('search/', '');
|
||||
const criteria = {
|
||||
page: page,
|
||||
limit: limit,
|
||||
@ -176,7 +177,7 @@ export async function requestSeoUrl(
|
||||
{
|
||||
type: 'contains',
|
||||
field: 'seoPathInfo',
|
||||
value: handle
|
||||
value: testing
|
||||
}
|
||||
]
|
||||
};
|
||||
|
@ -53,7 +53,7 @@ export async function getMenu(params?: {
|
||||
}
|
||||
|
||||
export async function getPage(handle: string | []): Promise<Page | undefined> {
|
||||
const pageHandle = decodeURIComponent(transformHandle(handle)).replace('cms/', '');
|
||||
const pageHandle = decodeURIComponent(transformHandle(handle));
|
||||
const seoUrlElement = await getFirstSeoUrlElement(pageHandle);
|
||||
if (seoUrlElement) {
|
||||
const category = await getCategory(seoUrlElement);
|
||||
|
Loading…
x
Reference in New Issue
Block a user