user handler password error

master
varun 2 years ago
parent 48e331d3a6
commit 95b77c9891

@ -129,6 +129,8 @@ exports.verifyUser = async (req, reply) => {
throw boom.boomify(err);
}
};
exports.validatePhoneFormat = async (req, reply) => {
try {
var user = new User(req.body);
@ -360,6 +362,7 @@ exports.verifyPhone = async (req, reply) => {
throw boom.boomify(err);
}
};
exports.sendPhoneVerificationCode = async (req, reply) => {
// Setting a regError in request so a user is not sent a verificaiton code if registration is not successful
// checkign if regError property is available in the req body, if it exists , do not send the message
@ -545,7 +548,7 @@ exports.sendPasswordResetCode = async (req) => {
// var authToken = twilioAuthToken; // Your Auth Token from www.twilio.com/console
var client = new twilio(twilioAccountSid, twilioAuthToken);
// var code = Math.floor(100000 + Math.random() * 900000);
code = user.passwordResetCode.toString();
//code = user.passwordResetCode.toString();
// Message format to allow app to autopickup sms message and
// verify the code.

Loading…
Cancel
Save