aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
Diffstat (limited to 'routes')
-rw-r--r--routes/index.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/index.js b/routes/index.js
index 4876d67..e0b4d27 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -9,6 +9,7 @@ router.get('/', function (req, res, next) {
const baseMeetingpointUrl = process.env.SCHOOL_LEVEL === 'mavo'
? 'http://www.meetingpointmco.nl/Roosters-AL/TOSweb'
: 'http://www.meetingpointmco.nl/Roosters-AL/doc';
+ const school = process.env.SCHOOL === 'kiemm' ? 'kiemm' : 'metis';
getMeetingpointData().then(data => {
let flags = []
@@ -20,7 +21,7 @@ router.get('/', function (req, res, next) {
const usersStr = `var USERS = ${JSON.stringify(data.users)};`
const validWeekNumbersStr = `var VALID_WEEK_NUMBERS = ${JSON.stringify(data.validWeekNumbers)}`
res.render('index', {
- school: process.env.SCHOOL === 'kiemm' ? 'kiemm' : 'metis',
+ school,
schoolLevel: process.env.SCHOOL_LEVEL === 'mavo' ? 'mavo' : 'havo-vwo',
baseMeetingpointUrl,
flagsStr,
@@ -30,6 +31,7 @@ router.get('/', function (req, res, next) {
}).catch(function () {
console.error('Unable to get user info, emergency redirect!')
res.render('redirect', {
+ school,
baseMeetingpointUrl,
})
})