cnc-speed-calculator/middleware/is-admin.js

10 lines
158 B
JavaScript
Raw Normal View History

2021-01-30 20:33:06 +01:00
module.exports = function (req, res, next){
if(req.user !== null && req.user.is_admin){
next()
}
else{
res.redirect('/')
}
}