DEV Community

Austin Layman
Austin Layman

Posted on

test 2

 if(token){
        jwt.verify(token, config.secret, (err, payload) => {
            if(err){console.log(err.message)
            res.redirect('/user/login')}
            else{
                console.log(payload)
                next()
            }
        })
    }else{

        res.redirect('/user/login')}
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)