summaryrefslogtreecommitdiff
path: root/controllers/root
diff options
context:
space:
mode:
authorJulien Dessaux2023-01-01 23:23:57 +0100
committerJulien Dessaux2023-01-02 20:26:28 +0100
commit3acf783d948ebb1907da875ef87b0da9ef2309ff (patch)
tree06b805fab10e638a9f5e66714ef4a29b6409c1e7 /controllers/root
parentRefactored game creation (diff)
downloadjeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.tar.gz
jeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.tar.bz2
jeux-de-mots-3acf783d948ebb1907da875ef87b0da9ef2309ff.zip
Began adding tests
Diffstat (limited to 'controllers/root')
-rw-r--r--controllers/root/login.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/controllers/root/login.js b/controllers/root/login.js
index b3e407b..ac6a471 100644
--- a/controllers/root/login.js
+++ b/controllers/root/login.js
@@ -16,14 +16,14 @@ function makePageData(user) {
export function login_get(req, res) {
if (req.session.user !== undefined) {
- return res.redirect(302, "/play");
+ return res.redirect(302, "/games");
}
return res.render("login", makePageData(req.session.user));
}
export async function login_post(req, res) {
if (req.session.user !== undefined) {
- return res.redirect(302, "/play");
+ return res.redirect(302, "/games");
}
let page = makePageData(req.session.user);
page.data = req.body;