remove deleteing the session over the API call when leaving the page

pull/923/head
Molham 2025-04-30 13:59:01 +02:00 committed by Bastien Wirtz
parent 15f59b9e36
commit 347a3d062b
1 changed files with 0 additions and 14 deletions

View File

@ -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");