diff options
Diffstat (limited to 'auth/public/script.js')
-rw-r--r-- | auth/public/script.js | 6 |
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("/"); +} |