From f2b7f3a3b4996a9ce0ee17cffc5f473bce6c6fa5 Mon Sep 17 00:00:00 2001 From: groegert Date: Fri, 21 May 2021 10:17:56 +0200 Subject: [PATCH] [core] call api.delete(`auth/${token}`) within a valid session fixes: #7 --- src/stores/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/index.ts b/src/stores/index.ts index 319bd9d..c1dd227 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -80,11 +80,11 @@ export const useMainStore = defineStore({ try { const token = this.session.token; + await api.delete(`/auth/${token}`); this.$patch({ session: undefined, user: undefined, }); - await api.delete(`/auth/${token}`); } catch (error) { return false; } finally {