
module.exports = async function(req, res, next){
    require('./isAuthorized')(req,res,function(){
        if(!req.ADMIN){
            return res.status(401).json({
                code: 'AUTH_ADMIN_INVALID',
                message: 'Invalid admin Token!'
            });
        }
        next()
    })
}
