diff --git a/account/src/lib/mail-utils.ts b/account/src/lib/mail-utils.ts index 949ab8b..b83645f 100644 --- a/account/src/lib/mail-utils.ts +++ b/account/src/lib/mail-utils.ts @@ -30,7 +30,7 @@ const transporter = nodemailer.createTransport({ }); async function sendEmail(to: Address, subject: string, text: string) { - await transporter.sendMail({ + return await transporter.sendMail({ from: adminAddress, to, subject, diff --git a/account/src/lib/user-utils.ts b/account/src/lib/user-utils.ts index 6ef9dd7..2421437 100644 --- a/account/src/lib/user-utils.ts +++ b/account/src/lib/user-utils.ts @@ -157,12 +157,14 @@ export async function createNewUser( lastLogin: now, lastActive: now, }; + console.log("SENDING VERIFICATION EMAIL FROM SIGNUP"); await sendVerificationEmail({ name: input.name, uid: userId, email: input.email || "", token: email.token, }); + console.log("GOT THROUGH AFTER VERIFICATION"); const user = await insertLingdocsUser(newUser); return user; } diff --git a/account/src/routers/auth-router.ts b/account/src/routers/auth-router.ts index 6c53f84..086fc32 100644 --- a/account/src/routers/auth-router.ts +++ b/account/src/routers/auth-router.ts @@ -190,6 +190,7 @@ const authRouter = (passport: PassportStatic) => { }); } catch (e) { console.error(e); + console.error("EMAIL DIDN'T WORK 2"); return res.send("Invalid E-mail"); } } catch (e) {