module.exports = {
    isOpration: function(req, res, next){
        if (req.isAuthenticated() && req.user.role === 'OT') {
            return next();
        } else {
            res.redirect('/');
        }
    },
    isAdmin: function(req, res, next){
        if (req.isAuthenticated() && req.user.role === 'Admin') {
            return next();
        } else {
            res.redirect('/');
        }
    } 
}
