Logout POST action (#10582)

* Change logout to POST

* Update for redirect

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
John Olheiser 2020-03-02 22:50:31 -06:00 committed by GitHub
parent bea497ff96
commit 0e2217bd2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 3 deletions

View file

@ -2741,11 +2741,14 @@ function showAddAllPopup() {
function linkAction() {
const $this = $(this);
const redirect = $this.data('redirect');
$.post($this.data('url'), {
_csrf: csrf
}).done((data) => {
if (data.redirect) {
window.location.href = data.redirect;
} else if (redirect) {
window.location.href = redirect;
} else {
window.location.reload();
}