diff options
author | Julien Dessaux | 2022-11-19 18:41:35 +0100 |
---|---|---|
committer | Julien Dessaux | 2022-11-19 18:41:35 +0100 |
commit | 54e06aa44a3134dfc42db3e4b473abf5e181fc42 (patch) | |
tree | 35c2358e0cbe47d21972535b8485aa0fd9756b8d /controllers/root/root.js | |
parent | Updated dependencies and fixed lint errors (diff) | |
download | jeux-de-mots-54e06aa44a3134dfc42db3e4b473abf5e181fc42.tar.gz jeux-de-mots-54e06aa44a3134dfc42db3e4b473abf5e181fc42.tar.bz2 jeux-de-mots-54e06aa44a3134dfc42db3e4b473abf5e181fc42.zip |
cleaned up the distinction between routes and controllers
Diffstat (limited to 'controllers/root/root.js')
-rw-r--r-- | controllers/root/root.js | 6 |
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"); +} |