diff options
author | Noah Loomans <noahloomans@gmail.com> | 2019-01-06 16:40:11 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2019-01-06 16:40:11 +0100 |
commit | 03c22460461d071944e6cd73c39f204ab5402f0b (patch) | |
tree | ba35b98da7f92782493ac0c28771f50f72f58f59 /routes | |
parent | e74320980a619452f52f0c27c96b7bc873ee02c7 (diff) |
Update logo on error page
Diffstat (limited to 'routes')
-rw-r--r-- | routes/index.js | 4 |
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, }) }) |