summaryrefslogtreecommitdiff
path: root/controllers/root/root.js
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/root/root.js')
-rw-r--r--controllers/root/root.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/controllers/root/root.js b/controllers/root/root.js
new file mode 100644
index 0000000..062edf4
--- /dev/null
+++ b/controllers/root/root.js
@@ -0,0 +1,6 @@
+export function root_get(req, res) {
+ if (req.session.user !== undefined) {
+ return res.redirect(302, "/games");
+ }
+ return res.redirect(302, "/login");
+}