diff --git a/src/lib/devices/DeviceCard/DeviceRoutes.svelte b/src/lib/devices/DeviceCard/DeviceRoutes.svelte index 2168ba2..59f606f 100644 --- a/src/lib/devices/DeviceCard/DeviceRoutes.svelte +++ b/src/lib/devices/DeviceCard/DeviceRoutes.svelte @@ -1,5 +1,5 @@ Device Routes diff --git a/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte b/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte index 09f09c8..f43d34c 100644 --- a/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte +++ b/src/lib/devices/DeviceCard/DeviceRoutesAPI.svelte @@ -80,30 +80,4 @@ throw error; }); } - - export async function deleteDeviceRoute(routeID: number): Promise { - // variables in local storage - let headscaleURL = localStorage.getItem('headscaleURL') || ''; - let headscaleAPIKey = localStorage.getItem('headscaleAPIKey') || ''; - let endpointURL = `/api/v1/routes/${routeID}`; - - await fetch(headscaleURL + endpointURL, { - method: 'DELETE', - headers: { - Accept: 'application/json', - Authorization: `Bearer ${headscaleAPIKey}` - } - }) - .then((response) => { - if (response.ok) { - } else { - return response.text().then((text) => { - throw JSON.parse(text).message; - }); - } - }) - .catch((error) => { - throw error; - }); - }