feat(poc): test something

This commit is contained in:
Björn Meyer 2023-07-17 11:42:15 +02:00
parent cc07397793
commit 2ee6394d27
2 changed files with 3 additions and 2 deletions

View File

@ -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
}
]
};

View File

@ -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);