cnc-speed-calculator/middleware/is-admin.js
Sebastien Clement 39a02da5f4 🔨 Add manager
2021-01-30 20:33:06 +01:00

10 lines
158 B
JavaScript

module.exports = function (req, res, next){
if(req.user !== null && req.user.is_admin){
next()
}
else{
res.redirect('/')
}
}