mirror of
https://github.com/mmumshad/ansible-playable.git
synced 2025-03-09 23:38:54 +00:00
Update server side test cases and disable client side tests for now. Integrate later.
This commit is contained in:
parent
ab295a073a
commit
9c880c0bba
13 changed files with 588 additions and 318 deletions
|
@ -104,8 +104,11 @@ export function changePassword(req, res) {
|
|||
export function me(req, res, next) {
|
||||
var userId = req.user._id;
|
||||
|
||||
console.log("Find User =" + JSON.stringify(req.user));
|
||||
|
||||
return User.findOne({ _id: userId }, '-salt -password').exec()
|
||||
.then(user => { // don't ever give out the password or salt
|
||||
console.log("User =" + JSON.stringify(user));
|
||||
if(!user) {
|
||||
return res.status(401).end();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue