Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur committed Jun 5, 2021
1 parent 323ba62 commit 501e77c
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions controllers/userController.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ function insertUser(req, res){
bcrypt.cryptPassword(req.body.password, (err, hash) => {
if(!err) {
newUser.password = hash;
newUser.gender = req.body.gender;
newUser.dob = req.body.dob;
newUser.mobileNumber = req.body.mobileNumber;
newUser.save((err, doc) => {
if(!err){
var response = {
status: 100,
message: "Registered successfully."
}
res.json(response);
} else {
console.log('Error during adding user: ' + err);
}
});
} else {
console.log(err);
}
})
newUser.gender = req.body.gender;
newUser.dob = req.body.dob;
newUser.mobileNumber = req.body.mobileNumber;
newUser.save((err, doc) => {
if(!err){
var response = {
status: 100,
message: "Registered successfully."
}
res.json(response);
} else {
console.log('Error during adding user: ' + err);
}
});
}

function fetchUser(req, res) {
Expand Down

1 comment on commit 501e77c

@vercel
Copy link

@vercel vercel bot commented on 501e77c Jun 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.