Optimize API calls, added form loading logs

This commit is contained in:
Julien Nahum
2024-01-25 05:12:45 +01:00
parent eceaae17da
commit 2dbbc38ba4
6 changed files with 21 additions and 24 deletions

View File

@@ -75,11 +75,8 @@ export const useAuthStore = defineStore('auth', {
// })
},
async logout() {
try {
await useOpnApi('logout', {method: 'POST'})
} catch (e) {
}
logout() {
opnFetch('logout', {method: 'POST'}).catch((error) => {})
this.user = null
this.setToken(null)