From 0e2217bd2d8833f0bff84767f676fc93c84d4b9a Mon Sep 17 00:00:00 2001 From: John Olheiser Date: Mon, 2 Mar 2020 22:50:31 -0600 Subject: Logout POST action (#10582) * Change logout to POST * Update for redirect Signed-off-by: jolheiser --- web_src/js/index.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'web_src') diff --git a/web_src/js/index.js b/web_src/js/index.js index b2eec525d3..570d392877 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -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(); } -- cgit v1.2.3