Updated code for registerUser controller, added firstName & lastName missing from model

master
parent b6ebb9f2dc
commit 62b0512c98

@ -27,6 +27,8 @@ module.exports.registerUser = (request, response) => {
const reqBody = request.body; const reqBody = request.body;
const newUser = new User({ const newUser = new User({
firstName: reqBody.firstName,
lastName: reqBody.lastName,
email: reqBody.email, email: reqBody.email,
password: bcrypt.hashSync(reqBody.password, 10), password: bcrypt.hashSync(reqBody.password, 10),
mobileNo: reqBody.mobileNo mobileNo: reqBody.mobileNo

Loading…
Cancel
Save