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,9 +195,17 @@
cancelButtonColor: '#d33',
confirmButtonText: 'Log out'
}, 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>
@endif