diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-24 00:56:53 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-24 00:56:53 +0000 |
| commit | 39afbefe2ea5b7a105c352049a4a4a171502e880 (patch) | |
| tree | c973111431d2f69bae4a7be57f05fd3a773da94f /routes/admin.js | |
| parent | dbdcb21969ffd5540bd310b14ee2348adac24b5c (diff) | |
| parent | 18b6e474fb64f7e9b4699d3bfbf3f5276e6996ad (diff) | |
Merged get_exam_byID
Diffstat (limited to 'routes/admin.js')
| -rw-r--r-- | routes/admin.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/routes/admin.js b/routes/admin.js index 5aa22fe..7e5c7fe 100644 --- a/routes/admin.js +++ b/routes/admin.js @@ -8,8 +8,6 @@ var passport_file = require('../config/passport.js'); var csrfProtection = csrf(); router.use(csrfProtection); // router is protected - - router.get('/', isAdmin, function(req,res){ res.render('admin', {csrfToken: req.csrfToken()}); }); @@ -65,7 +63,7 @@ router.post('/add/course', function(req,res){ res.redirect('/admin'); }); -// Add a new admin, redirect to admin panel +/* Add a new admin, redirect to admin panel */ router.post('/add/admin', function(req,res){ var admin_data = { fname: req.body.fname, @@ -128,7 +126,6 @@ module.exports = router; /************** Route protection ********************/ - function isAdmin(req, res, next) { if (req.user && !req.user.email){ return next(); |
