fix: use POST for admin logout route (#3710)

Quick fix for logging out from the admin panel as the auth route was changed from GET to POST.
This commit is contained in:
Alex 2021-10-30 23:27:59 +03:00 committed by GitHub
parent 4dca4f0aa9
commit d0663dcbd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -195,7 +195,15 @@
cancelButtonColor: '#d33', cancelButtonColor: '#d33',
confirmButtonText: 'Log out' confirmButtonText: 'Log out'
}, function () { }, function () {
window.location = $(that).attr('href'); $.ajax({
type: 'POST',
url: '{{ route('auth.logout') }}',
data: {
_token: '{{ csrf_token() }}'
},complete: function () {
window.location.href = '{{route('auth.login')}}';
}
});
}); });
}); });
</script> </script>