mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
change from "GET" to "POST" request for logout user or customer
This commit is contained in:
@ -46,7 +46,7 @@ export const useAuthStore = (useWindow = false) => {
|
||||
logout() {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios
|
||||
.get('/auth/logout')
|
||||
.post('/auth/logout')
|
||||
.then((response) => {
|
||||
const notificationStore = useNotificationStore()
|
||||
notificationStore.showNotification({
|
||||
@ -55,7 +55,7 @@ export const useAuthStore = (useWindow = false) => {
|
||||
})
|
||||
|
||||
window.router.push('/login')
|
||||
// resetStore.clearPinia()
|
||||
// resetStore.clearPinia()
|
||||
resolve(response)
|
||||
})
|
||||
.catch((err) => {
|
||||
@ -67,4 +67,4 @@ export const useAuthStore = (useWindow = false) => {
|
||||
},
|
||||
},
|
||||
})()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user