Cleaned up the functions being called it some routes.
This commit is contained in:
parent
cbb8cf9042
commit
86998dac7a
10
web.js
10
web.js
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue