aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-09-04 20:12:23 +0200
committerNoah Loomans <noahloomans@gmail.com>2017-09-04 20:12:23 +0200
commite3947f0d11864f40a2c0a202af99e0b14ff14dcf (patch)
tree38d1eaa9509cafa616c13ec60481418e8c1dc4cd /routes
parent92a85bee3371702dd1a053dcc2f7bd8922802795 (diff)
Only show weeks that are available
Diffstat (limited to 'routes')
-rw-r--r--routes/index.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/routes/index.js b/routes/index.js
index 1ab2ba3..570fe5f 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -2,7 +2,7 @@
const express = require('express')
const router = express.Router()
-const users = require('../lib/getUserIndex')
+const data = require('../lib/getUserIndex')
/* GET home page. */
router.get('/', function (req, res, next) {
@@ -12,8 +12,9 @@ router.get('/', function (req, res, next) {
}
const flagsStr = `var FLAGS = ${JSON.stringify(flags)};`
- const usersStr = `var USERS = ${JSON.stringify(users.users)};`
- res.render('index', { flagsStr, usersStr })
+ const usersStr = `var USERS = ${JSON.stringify(data.users)};`
+ const validWeekNumbersStr = `var VALID_WEEK_NUMBERS = ${JSON.stringify(data.validWeekNumbers)}`
+ res.render('index', { flagsStr, usersStr, validWeekNumbersStr })
})
module.exports = router