summaryrefslogtreecommitdiff
path: root/routes/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'routes/play.js')
-rw-r--r--routes/play.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/routes/play.js b/routes/play.js
index 1c87895..4db9acd 100644
--- a/routes/play.js
+++ b/routes/play.js
@@ -1,5 +1,6 @@
import express from "express";
+import makePlayController from "../controllers/play.js";
import requireAuth from "../middlewares/requireAuth.js";
import session from "../middlewares/sessions.js";
@@ -8,7 +9,7 @@ router.use(session);
router.use(requireAuth);
router.get("/", (req, res) => {
- const CWDATA = {
+ const cwdata = {
board: [
[ "", "", "", "", "","", "", "", "", "", "", "", "", "", "" ],
[ "", "", "", "", "","", "", "", "", "", "", "", "", "", "" ],
@@ -28,7 +29,7 @@ router.get("/", (req, res) => {
],
letters: [ "A", "B", "C", "D", "E", "F", "JOKER" ]
};
- return res.render("play", {CWDATA: CWDATA, title: "Jouer"});
+ return res.render("play", makePlayController(req, cwdata));
});
export default router;