Cleaned up the functions being called it some routes.

This commit is contained in:
Bram van der Veen 2015-07-22 15:45:31 +02:00
parent cbb8cf9042
commit 86998dac7a

10
web.js
View file

@ -37,19 +37,13 @@ app.get('/logout', auth.logout);
app.get('/api/:api', function (req, res, next) { next(); }); app.get('/api/:api', function (req, res, next) { next(); });
app.param('api', api); app.param('api', api);
app.get('/rooster/:search', function (req, res, next) {
next();
});
app.param('search', auth.is);
app.param('search', lookup.get); app.param('search', lookup.get);
app.param('search', schedule.get);
app.param('search', function (req, res) { app.get('/rooster/:search', [auth.is, schedule.get, function (req, res) {
req.links = config().links; req.links = config().links;
req.times = config().hour_times; req.times = config().hour_times;
res.render('schedule', req); res.render('schedule', req);
}); }]);
app.param('list', lookup.list); app.param('list', lookup.list);