From 86998dac7aecc098669d4001b942205b23ee490d Mon Sep 17 00:00:00 2001 From: Bram van der Veen <96aa48@gmail.com> Date: Wed, 22 Jul 2015 15:45:31 +0200 Subject: [PATCH] Cleaned up the functions being called it some routes. --- web.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/web.js b/web.js index 769e4fb..103ce37 100644 --- a/web.js +++ b/web.js @@ -37,19 +37,13 @@ app.get('/logout', auth.logout); app.get('/api/:api', function (req, res, next) { next(); }); 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', schedule.get); -app.param('search', function (req, res) { +app.get('/rooster/:search', [auth.is, schedule.get, function (req, res) { req.links = config().links; req.times = config().hour_times; res.render('schedule', req); -}); +}]); app.param('list', lookup.list);