summaryrefslogtreecommitdiff
path: root/controllers/games/root.js
diff options
context:
space:
mode:
authorJulien Dessaux2023-01-03 23:51:00 +0100
committerJulien Dessaux2023-01-03 23:51:00 +0100
commitc5d2d7ca77a502ea607d2db5ecdec972bc76bc69 (patch)
tree877c4bb29aef5ba8de491d78cfc9ee7e31232ad7 /controllers/games/root.js
parentContinue adding tests (diff)
downloadjeux-de-mots-c5d2d7ca77a502ea607d2db5ecdec972bc76bc69.tar.gz
jeux-de-mots-c5d2d7ca77a502ea607d2db5ecdec972bc76bc69.tar.bz2
jeux-de-mots-c5d2d7ca77a502ea607d2db5ecdec972bc76bc69.zip
Fixed fixtures and testing
Diffstat (limited to 'controllers/games/root.js')
-rw-r--r--controllers/games/root.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/controllers/games/root.js b/controllers/games/root.js
index 0483f55..4a4e80d 100644
--- a/controllers/games/root.js
+++ b/controllers/games/root.js
@@ -19,9 +19,7 @@ function makePageData(user) {
export function root_get(req, res) {
let page = makePageData(req.session.user);
- for (let i=0; i<page.games.length; i++) {
- page.games[i].data = JSON.parse(page.games[i].data);
- }
+ page.games.forEach(g => g.data = JSON.parse(g.data));
return res.render("games", page);
}