diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-03-02 22:50:31 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 22:50:31 -0600 |
commit | 0e2217bd2d8833f0bff84767f676fc93c84d4b9a (patch) | |
tree | 1c3761814e57b37cb313a9e475719d76e9dbe02f /web_src | |
parent | bea497ff96f4deae617e54468576d11d105e2125 (diff) | |
download | gitea-0e2217bd2d8833f0bff84767f676fc93c84d4b9a.tar.gz gitea-0e2217bd2d8833f0bff84767f676fc93c84d4b9a.zip |
Logout POST action (#10582)
* Change logout to POST
* Update for redirect
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/index.js | 3 |
1 files changed, 3 insertions, 0 deletions
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(); } |