From 62e362ebc67a096484e90cf05af8de8ecfebbc5d Mon Sep 17 00:00:00 2001 From: routerino <45954722+routerino@users.noreply.github.com> Date: Sat, 24 Dec 2022 10:49:14 +1100 Subject: [PATCH] fixed regression in legacy api (#88) --- src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte b/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte index 3ca0d6b..2c340b0 100644 --- a/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte +++ b/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte @@ -66,11 +66,11 @@ routeList.forEach((route) => { if (route.enabled) { endpointURL += encodeURIComponent(route.prefix); - endpointURL += '&'; + endpointURL += '&routes='; } }); // remove trailing ampersand and routes= expressions - endpointURL = (endpointURL.replace(/\&$/, '')).replace(/routes=$/,''); + endpointURL = endpointURL.replace(/\&routes=$/, '').replace(/\?routes=$/, '?'); } else { routeList.forEach((route) => { if (route.id == routeID) {