diff --git a/web/src/device-management.ts b/web/src/device-management.ts index e59c70b..cd62f8e 100644 --- a/web/src/device-management.ts +++ b/web/src/device-management.ts @@ -102,6 +102,8 @@ function showDeviceSettings(deviceId: string): void { const token = getToken(); if (!token) return; + let deviceType: any; + fetch(`/api/devices/${deviceId}`, { headers: { Authorization: `Bearer ${token}` }, }) @@ -115,7 +117,7 @@ function showDeviceSettings(deviceId: string): void { if (syncFrequencyInput) syncFrequencyInput.value = String(device.sync_frequency_minutes || 60); - const deviceType = device.device_type; + deviceType = device.device_type; return fetch("/api/collections", { headers: { Authorization: `Bearer ${token}` }, }); diff --git a/web/src/unlinked_books.ts b/web/src/unlinked_books.ts index aecd481..069446b 100644 --- a/web/src/unlinked_books.ts +++ b/web/src/unlinked_books.ts @@ -105,7 +105,7 @@ function autoLinkBook( body: JSON.stringify(data), }) .then((response) => response.json()) - .then((result) => { + .then(() => { showToast("Book linked successfully", "success"); window.location.reload(); }) @@ -267,7 +267,7 @@ function confirmManualLink(): void { body: JSON.stringify(data), }) .then((response) => response.json()) - .then((result) => { + .then(() => { showToast("Book linked successfully", "success"); hideManualLinkModal(); window.location.reload();