Преглед изворни кода

Minor changes

pull/47/head^2
Djordje Djoric пре 4 година
родитељ
комит
5db454013d
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      src/middleware/auth.js

+ 1
- 1
src/middleware/auth.js Прегледај датотеку

@@ -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!')

Loading…
Откажи
Сачувај