summaryrefslogtreecommitdiff
path: root/controllers/login.js
diff options
context:
space:
mode:
authorJulien Dessaux2022-10-31 22:40:42 +0100
committerJulien Dessaux2022-10-31 22:40:42 +0100
commitb91bb0a133aa3d0400beb359fed4e641c888ab26 (patch)
tree0b703fab300ab39ffd39708b193bcfa09e89f6f5 /controllers/login.js
parentFixed middleware action without return (diff)
downloadjeux-de-mots-b91bb0a133aa3d0400beb359fed4e641c888ab26.tar.gz
jeux-de-mots-b91bb0a133aa3d0400beb359fed4e641c888ab26.tar.bz2
jeux-de-mots-b91bb0a133aa3d0400beb359fed4e641c888ab26.zip
Added logout route, and a way to display the logout menu item on relevant pages
Diffstat (limited to 'controllers/login.js')
-rw-r--r--controllers/login.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/controllers/login.js b/controllers/login.js
index bff312e..b274a9e 100644
--- a/controllers/login.js
+++ b/controllers/login.js
@@ -1,6 +1,7 @@
-function makeLoginController() {
+function makeController(req) {
return {
- title: "Connection",
+ title: "Connexion",
+ user: req.session.user,
data: {
username: "",
password: "",
@@ -9,4 +10,4 @@ function makeLoginController() {
};
}
-export default makeLoginController;
+export default makeController;