From 09ecbe89e32abd24f40069ba842917bb953d43a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Meyer?= Date: Fri, 14 Jul 2023 12:55:01 +0200 Subject: [PATCH] feat(poc): next dump try --- lib/shopware/api.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/lib/shopware/api.ts b/lib/shopware/api.ts index 13892765f..b89f33ca2 100644 --- a/lib/shopware/api.ts +++ b/lib/shopware/api.ts @@ -105,6 +105,7 @@ export async function requestSeoUrl( page: number = 1, limit: number = 1 ): Promise { + const fixedHandle = handle.replace('%2F', '/'); return await apiInstance.invoke('readSeoUrl post /seo-url', { page: page, limit: limit, @@ -117,22 +118,12 @@ export async function requestSeoUrl( { type: 'equals', field: 'seoPathInfo', - value: handle + '/' + value: fixedHandle + '/' }, { type: 'equals', field: 'seoPathInfo', - value: handle - }, - { - type: 'equals', - field: 'seoPathInfo', - value: decodeURIComponent(handle) + '/' - }, - { - type: 'equals', - field: 'seoPathInfo', - value: decodeURIComponent(handle) + value: fixedHandle } ] }