Skip to content

Commit

Permalink
feat: alteração da entrega do token para ficar mais claro para o usuario
Browse files Browse the repository at this point in the history
  • Loading branch information
PauloGoncalvesBH committed May 2, 2020
1 parent 920840d commit 3aa7d69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/login-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports.post = async (req, res) => {
try {
if (await usuariosService.existeUsuarioComEsseEmailESenha(req.body)) {
const token = authService.createToken(req.body)
return res.status(200).send({ message: constant.LOGIN_SUCESS, token })
return res.status(200).send({ message: constant.LOGIN_SUCESS, authorization: `Bearer ${token}` })
}
res.status(401).send({ message: constant.LOGIN_FAIL })
} catch (error) {
Expand Down

0 comments on commit 3aa7d69

Please sign in to comment.