From abb91aad26d82cd8770d758aa212722a4cf3c8af Mon Sep 17 00:00:00 2001 From: Alexander Alemayhu Date: Sun, 22 May 2022 12:07:28 +0200 Subject: [PATCH] fix(email): add missing API prefix for user endpoints --- server/lib/email/EmailHandler.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/server/lib/email/EmailHandler.ts b/server/lib/email/EmailHandler.ts index 84b28a798..c1e85f8ad 100644 --- a/server/lib/email/EmailHandler.ts +++ b/server/lib/email/EmailHandler.ts @@ -25,7 +25,7 @@ sgMail.setApiKey(process.env.SENDGRID_API_KEY); class EmailHandler { static SendResetEmail(email: any, token: string) { - const link = `${process.env.DOMAIN}/users/r/${token}`; + const link = `${process.env.DOMAIN}/api/users/r/${token}`; const markup = PASSWORD_RESET_TEMPLATE.replace("{{link}}", link); const msg = { to: email, @@ -40,11 +40,8 @@ class EmailHandler { return sgMail.send(msg); } - static async SendVerificationEmail( - email: string, - token: string - ) { - const link = `${process.env.DOMAIN}/users/v/${token}`; + static async SendVerificationEmail(email: string, token: string) { + const link = `${process.env.DOMAIN}/api/users/v/${token}`; const markup = VERIFICATION_TEMPLATE.replace("{{link}}", link); const msg = {