about summary refs log tree commit diff
path: root/hosted/logout.js
diff options
context:
space:
mode:
authormaride <maride@darknebu.la>2018-09-08 02:51:39 +0200
committermaride <maride@darknebu.la>2018-09-08 02:51:39 +0200
commit475c5999b57135fefd6129c00e87d7f5aa9a75cc (patch)
tree39143d1517bb7d8fa91e405c749d641f0fc421b4 /hosted/logout.js
parent116b1472cf69f920e27da36702a39959bc83b315 (diff)
UI: GET/POST logout fix, avoid 'Wrong credentials' notice when logging out
Diffstat (limited to 'hosted/logout.js')
-rw-r--r--hosted/logout.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/hosted/logout.js b/hosted/logout.js
new file mode 100644
index 0000000..4dedd4d
--- /dev/null
+++ b/hosted/logout.js
@@ -0,0 +1,5 @@
+function logoutThenRedirect() {
+    $.post("/logout").done(function(data) {
+        window.location.replace("/");
+    });
+}
\ No newline at end of file