Forgot to add hours_times and links to the schedule route

This commit is contained in:
Bram van der Veen 2015-06-15 00:06:00 +02:00
parent 2bb72b97a1
commit 39413b118a

10
web.js
View file

@ -15,25 +15,25 @@ app.use('/js', express.static(__dirname + '/resources/js'));
app.get('/', function (req, res) { app.get('/', function (req, res) {
req.links = config().links; req.links = config().links;
console.log(req.links);
res.render('homepage', req); res.render('homepage', req);
}); });
app.get('/rooster/:search', function (req, res) { app.get('/rooster/:search', function (req, res) {
next(); next();
}); });
app.get('/over', function (req, res) { app.get('/over', function (req, res) {
res.send('Hier kun je lezen over werkmanrooster.'); res.send('Hier kun je lezen over werkmanrooster.');
}); });
app.param('search', lookup); app.param('search', lookup);
app.param('search', schedule); app.param('search', schedule);
app.param('search', function (req, res) { app.param('search', function (req, res) {
res.render('schedule', req); req.links = config().links;
console.log(req); req.times = config().hour_times;
res.render('schedule', req);
}); });
app.listen(config().web_port); app.listen(config().web_port);