From e5bc8bb37d6ae4ab7b61ea4424a7a20b28d059ed Mon Sep 17 00:00:00 2001 From: Antal Orcsik Date: Mon, 1 Jul 2024 16:23:14 +0200 Subject: [PATCH] update integrations logic --- src/js/integrations/worker.js | 4 ++-- src/js/steps.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/integrations/worker.js b/src/js/integrations/worker.js index 6da32b2..e2148d9 100644 --- a/src/js/integrations/worker.js +++ b/src/js/integrations/worker.js @@ -4,8 +4,8 @@ addEventListener('fetch', (event) => { urlObject.hostname = 'webflow.bitrise.io'; if (urlObject.pathname.match(/^\/integrations\/steps\/.+/)) { - urlObject.pathname = '/integrations/steps'; - } else if (urlObject.pathname.match(/\/integrations$|integrations\/(.*)/)) { + urlObject.pathname = '/integrations/step'; + } else if (urlObject.pathname.match(/^\/integrations\/?$/)) { urlObject.pathname = '/integrations'; } diff --git a/src/js/steps.js b/src/js/steps.js index e3e84bd..b166902 100644 --- a/src/js/steps.js +++ b/src/js/steps.js @@ -28,7 +28,7 @@ const details = new DetailsSection(); IntegrationsService.loadIntegrations().then((integrations) => { if (!stepFilter || !(stepFilter in integrations.steps)) { - window.location.href = '/integrations/steps/not-found'; // 404 + window.location.href = '/integrations'; } else { const step = integrations.steps[stepFilter];