fixed regression in legacy api (#88)

This commit is contained in:
routerino 2022-12-24 10:49:14 +11:00 committed by GitHub
parent 271e1045a0
commit 62e362ebc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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