From 347a3d062b08fcfd54fd9aefe75ab435375efdf5 Mon Sep 17 00:00:00 2001 From: Molham Date: Wed, 30 Apr 2025 13:59:01 +0200 Subject: [PATCH] remove deleteing the session over the API call when leaving the page --- src/components/services/PiHole.vue | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/components/services/PiHole.vue b/src/components/services/PiHole.vue index 55656e9..8ca67b8 100644 --- a/src/components/services/PiHole.vue +++ b/src/components/services/PiHole.vue @@ -66,7 +66,6 @@ export default { beforeDestroy() { if (parseInt(this.item.apiVersion, 10) === 6) { this.stopStatusPolling(); - this.deleteSession(); } }, methods: { @@ -109,19 +108,6 @@ export default { this.sessionId = null; this.sessionExpiry = null; }, - deleteSession: async function () { - if (!this.sessionId) return; - - try { - await this.fetch(`/api/auth/session/${encodeURIComponent(this.sessionId)}`, { - method: 'DELETE' - }); - } catch (e) { - this.handleError(`Failed to delete session: ${e}`, "error"); - } finally { - this.removeCacheSession(); - } - }, authenticate: async function () { if (!this.item.apikey) { this.handleError("API key is required for PiHole authentication", "disabled");