| @@ -23,7 +23,7 @@ const authRole = async (req, res, next) => { | |||
| const findUser = await User.findOne({ 'tokens.token': token }) | |||
| if(!findUser) { | |||
| return res.status(404).send('No user has the token provided!') | |||
| return res.status(401).send('No user has the token provided!') | |||
| } | |||
| if(findUser['role'] === Role.Admin) { | |||
| console.log('User is admin!') | |||