mirror of https://github.com/bastienwirtz/homer
remove deleteing the session over the API call when leaving the page
parent
15f59b9e36
commit
347a3d062b
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue