Explorar el Código

Minor changes

pull/47/head^2
Djordje Djoric hace 4 años
padre
commit
5db454013d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      src/middleware/auth.js

+ 1
- 1
src/middleware/auth.js Ver fichero

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

Cargando…
Cancelar
Guardar