aboutsummaryrefslogtreecommitdiff
path: root/routes/index.js
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2018-12-29 16:58:34 +0100
committerNoah Loomans <noahloomans@gmail.com>2018-12-29 16:58:34 +0100
commit1145c7ef325f1190e89c4684f180a26d3a74128b (patch)
tree311e14b1a4c24d63d4480e14ef8a698bfbb0b9ab /routes/index.js
parentcaeb6bad750ed3d7e26606dca07edc097885d8ce (diff)
Add kiemm version
The kiemm is functionally identical to the rosoterTOS version, but branded differently
Diffstat (limited to 'routes/index.js')
-rw-r--r--routes/index.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/routes/index.js b/routes/index.js
index 223d97f..4876d67 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -19,7 +19,14 @@ router.get('/', function (req, res, next) {
const flagsStr = `var FLAGS = ${JSON.stringify(flags)};`
const usersStr = `var USERS = ${JSON.stringify(data.users)};`
const validWeekNumbersStr = `var VALID_WEEK_NUMBERS = ${JSON.stringify(data.validWeekNumbers)}`
- res.render('index', { baseMeetingpointUrl, flagsStr, usersStr, validWeekNumbersStr })
+ res.render('index', {
+ school: process.env.SCHOOL === 'kiemm' ? 'kiemm' : 'metis',
+ schoolLevel: process.env.SCHOOL_LEVEL === 'mavo' ? 'mavo' : 'havo-vwo',
+ baseMeetingpointUrl,
+ flagsStr,
+ usersStr,
+ validWeekNumbersStr
+ })
}).catch(function () {
console.error('Unable to get user info, emergency redirect!')
res.render('redirect', {