mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-29 12:41:10 -04:00
Merge branch 'change-logout-request' into 'master'
change from "GET" to "POST" request for logout user or customer See merge request mohit.panjvani/crater-web!1438
This commit is contained in:
@ -46,7 +46,7 @@ export const useAuthStore = (useWindow = false) => {
|
|||||||
logout() {
|
logout() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios
|
axios
|
||||||
.get('/auth/logout')
|
.post('/auth/logout')
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
const notificationStore = useNotificationStore()
|
const notificationStore = useNotificationStore()
|
||||||
notificationStore.showNotification({
|
notificationStore.showNotification({
|
||||||
|
|||||||
@ -103,7 +103,7 @@ export const useAuthStore = defineStore({
|
|||||||
logout(data) {
|
logout(data) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios
|
axios
|
||||||
.get(`${data}/customer/logout`)
|
.post(`${data}/customer/logout`)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
const notificationStore = useNotificationStore()
|
const notificationStore = useNotificationStore()
|
||||||
notificationStore.showNotification({
|
notificationStore.showNotification({
|
||||||
|
|||||||
@ -42,7 +42,7 @@ Route::get('/modules/scripts/{script}', ScriptController::class);
|
|||||||
|
|
||||||
Route::post('login', [LoginController::class, 'login']);
|
Route::post('login', [LoginController::class, 'login']);
|
||||||
|
|
||||||
Route::get('auth/logout', function () {
|
Route::post('auth/logout', function () {
|
||||||
Auth::guard('web')->logout();
|
Auth::guard('web')->logout();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ Route::get('auth/logout', function () {
|
|||||||
|
|
||||||
Route::post('/{company:slug}/customer/login', CustomerLoginController::class);
|
Route::post('/{company:slug}/customer/login', CustomerLoginController::class);
|
||||||
|
|
||||||
Route::get('/{company:slug}/customer/logout', function () {
|
Route::post('/{company:slug}/customer/logout', function () {
|
||||||
Auth::guard('customer')->logout();
|
Auth::guard('customer')->logout();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user