🗑added public folder content to gitignore

This commit is contained in:
canove
2020-07-08 14:29:16 -03:00
parent b1bed3623e
commit aaf81019d5
45 changed files with 26 additions and 52 deletions

View File

@@ -14,9 +14,7 @@ module.exports = (req, res, next) => {
}
if (!decodedToken) {
const error = new Error("Falha na autenticação");
error.statusCode = 401;
next(error);
return res.status(401).json({ message: "Unauthorized" });
}
next();