Skip to content

Commit

Permalink
aded username to the log in response
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefkarim committed Sep 27, 2023
1 parent 8e0e9ae commit 9c5a98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/log-inController.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ exports.logIn_post_api = [
if (!user) { return res.send({title:'Log in',errors:[info]}) }

const accessToken = jwt.sign({username:req.body.username}, process.env.ACCESS_TOKEN_SECRET)
res.send({accessToken:accessToken});
res.send({accessToken:accessToken,username:user.username});
})(req, res, next)
}
}),
Expand Down

0 comments on commit 9c5a98a

Please sign in to comment.