You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
html: `<img src="https://media-exp1.licdn.com/dms/image/sync/C4E22AQG4zTDlyguaNQ/feedshare-shrink_800/0/1602572271436?e=1623888000&v=beta&t=Aq2jU_LLoM8lK5Mq7TgYxdf-9tkVZJs3Bc2m0HK68tw" /><br><br>Hello,<br> Please Click on the link to verify your email.<br><a href=${link}>Click here to verify</a><br>The above link is valid for ${process.env.EMAIL_LINK_VALIDITY} minutes only`,
29
-
};
30
-
try{
31
-
//send email to the user
32
-
letresponse=awaitsendEmail(mailOptions);
12
+
returnres.redirect('/home');
13
+
try{
14
+
constresponse=awaitsendEmail(id,user.email);
33
15
console.log(response);
34
-
//render verifyEmail page to inform user that an email has been sent at his registered mobile number now
35
-
returnres.render("verifyEmailMsg");
36
-
}catch(err){
16
+
res.set("Cache-Control","no-store");
17
+
returnres.status(200).send({msg:"success"});
18
+
}
19
+
catch(err){
37
20
console.log(err);
38
-
returnres.status(500).send(err);
21
+
returnres.status(500).send({errorMsg:"Can't sent Otp! Something went wrong"});
0 commit comments