From 9ae52d4c25947cba325bc0993c42e991a20af17a Mon Sep 17 00:00:00 2001 From: Akhil Meka Date: Tue, 29 Jul 2025 17:05:23 +0530 Subject: [PATCH] fix: include url in the email body --- src/user/user.service.ts | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/user/user.service.ts b/src/user/user.service.ts index 9210c0f..9103046 100644 --- a/src/user/user.service.ts +++ b/src/user/user.service.ts @@ -55,16 +55,19 @@ export async function createUser( await newUser.save(); + const URL = + "https://" + + process.env.SERVER_DOMAIN + + "/auth/webauthn/register?token=" + + token + + "&email=" + + newUser.email; + const sent = await sendMail( input.email, "You have been invited to Quicker Permits.", - `Click here to register.

The above link expires in 48 hours

` + `Click here to register.

The above link expires in 48 hours

+

Go to this URL is the above link doesn't work: ${URL}

` ); return userModel @@ -95,16 +98,19 @@ export async function resetUser(userId: string, user?: AuthenticatedUser) { throw ErrUserNotFound; } + const URL = + "https://" + + process.env.SERVER_DOMAIN + + "/auth/webauthn/register?token=" + + token + + "&email=" + + userInDb.email; + const sent = await sendMail( userInDb.email, "Quicker Permits account reset", - `

Click here to reset.

The above link expires in 48 hours

` + `

Click here to reset.

The above link expires in 48 hours

+

Go to this URL is the above link doesn't work: ${URL}

` ); }