diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-24 00:54:48 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-24 00:54:48 +0000 |
| commit | dbdcb21969ffd5540bd310b14ee2348adac24b5c (patch) | |
| tree | 2dd748f9655cc147051e12aa5879174913204b4d /routes/admin.js | |
| parent | 17d743822746b047b94cd24e5407f1342ba01a7e (diff) | |
Added comments for user, along with dummy data if the user doesn't have any comments
Diffstat (limited to 'routes/admin.js')
| -rw-r--r-- | routes/admin.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routes/admin.js b/routes/admin.js index e038fa3..5aa22fe 100644 --- a/routes/admin.js +++ b/routes/admin.js @@ -130,7 +130,7 @@ module.exports = router; /************** Route protection ********************/ function isAdmin(req, res, next) { - if (!req.user.email){ + if (req.user && !req.user.email){ return next(); } res.redirect('/'); |
