Skip to content

Commit

Permalink
fix(email): add missing API prefix for user endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed May 22, 2022
1 parent 8c5e4a7 commit abb91aa
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions server/lib/email/EmailHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 = {
Expand Down

0 comments on commit abb91aa

Please sign in to comment.