diff --git a/resources/scripts/admin/stores/auth.js b/resources/scripts/admin/stores/auth.js index 220c3c17a..363bd7358 100644 --- a/resources/scripts/admin/stores/auth.js +++ b/resources/scripts/admin/stores/auth.js @@ -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) => { }, }, })() -} +} \ No newline at end of file diff --git a/resources/scripts/customer/stores/auth.js b/resources/scripts/customer/stores/auth.js index 2087596f6..19e3d44e2 100644 --- a/resources/scripts/customer/stores/auth.js +++ b/resources/scripts/customer/stores/auth.js @@ -50,7 +50,7 @@ export const useAuthStore = defineStore({ axios .post(`/api/v1/${data.company}/customer/auth/password/email`, data) - .then((response) => { + .then((response) => { if (response.data) { notificationStore.showNotification({ type: 'success', @@ -78,7 +78,7 @@ export const useAuthStore = defineStore({ axios .post(`/api/v1/${company}/customer/auth/reset/password`, data) - .then((response) => { + .then((response) => { if (response.data) { const notificationStore = useNotificationStore(true) notificationStore.showNotification({ @@ -103,7 +103,7 @@ export const useAuthStore = defineStore({ logout(data) { return new Promise((resolve, reject) => { axios - .get(`${data}/customer/logout`) + .post(`${data}/customer/logout`) .then((response) => { const notificationStore = useNotificationStore() notificationStore.showNotification({ @@ -120,4 +120,4 @@ export const useAuthStore = defineStore({ }) }, }, -}) +}) \ No newline at end of file