aboutsummaryrefslogtreecommitdiff
path: root/auth/public/script.js
diff options
context:
space:
mode:
authorLarsVomMars2020-10-04 00:52:42 +0200
committerLarsVomMars2020-10-04 00:52:49 +0200
commit53b84f7ede1ad26e5111cd6da9c13042d98a290b (patch)
treebc314b88c83ee4e046ab1041a06fd3e3d4eb26ea /auth/public/script.js
parent88a2c395ad96c65d75ea64c57d68b62d93bc12c3 (diff)
Password change
Diffstat (limited to 'auth/public/script.js')
-rw-r--r--auth/public/script.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/auth/public/script.js b/auth/public/script.js
new file mode 100644
index 0000000..b50bf9b
--- /dev/null
+++ b/auth/public/script.js
@@ -0,0 +1,6 @@
+loggedIn();
+
+async function loggedIn() {
+ const resp = await fetch("api/status");
+ if (!(await resp.json())["loggedIn"]) location.redirect("/");
+}