Skip to content

Commit

Permalink
Fixing updating the user and sending SMS code
Browse files Browse the repository at this point in the history
  • Loading branch information
Wayne Rambo committed Aug 21, 2019
1 parent 3724809 commit 833c9b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloud/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ Parse.Cloud.define("findUser3", async req => {
if(user) {
console.log("Found a user, user is: " + user);
console.log("About to send a SMS")
sendCodeSms(phoneNumber, num, language);
sendCodeSms(phoneNumber, num, "en");
console.log("Sent the SMS")
user.setPassword(secretPasswordToken + num);
user.set("language", "en");
user.save().then(function() {
sendCodeSms(phoneNumber, num, language);
sendCodeSms(phoneNumber, num, "en");
})
} else {
console.log("Did not find a user, create and return it");
Expand Down

0 comments on commit 833c9b0

Please sign in to comment.