fix: include url in the email body
This commit is contained in:
@@ -55,16 +55,19 @@ export async function createUser(
|
|||||||
|
|
||||||
await newUser.save();
|
await newUser.save();
|
||||||
|
|
||||||
const sent = await sendMail(
|
const URL =
|
||||||
input.email,
|
"https://" +
|
||||||
"You have been invited to Quicker Permits.",
|
|
||||||
`Click <a href="${
|
|
||||||
process.env.SERVER_DOMAIN +
|
process.env.SERVER_DOMAIN +
|
||||||
"/auth/webauthn/register?token=" +
|
"/auth/webauthn/register?token=" +
|
||||||
token +
|
token +
|
||||||
"&email=" +
|
"&email=" +
|
||||||
newUser.email
|
newUser.email;
|
||||||
}">here</a> to register.</p><p>The above link expires in 48 hours</p>`
|
|
||||||
|
const sent = await sendMail(
|
||||||
|
input.email,
|
||||||
|
"You have been invited to Quicker Permits.",
|
||||||
|
`Click <a href="${URL}">here</a> to register.</p><p>The above link expires in 48 hours</p>
|
||||||
|
<p>Go to this URL is the above link doesn't work: <span>${URL}</span></p>`
|
||||||
);
|
);
|
||||||
|
|
||||||
return userModel
|
return userModel
|
||||||
@@ -95,16 +98,19 @@ export async function resetUser(userId: string, user?: AuthenticatedUser) {
|
|||||||
throw ErrUserNotFound;
|
throw ErrUserNotFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
const sent = await sendMail(
|
const URL =
|
||||||
userInDb.email,
|
"https://" +
|
||||||
"Quicker Permits account reset",
|
|
||||||
`<p>Click <a href="${
|
|
||||||
process.env.SERVER_DOMAIN +
|
process.env.SERVER_DOMAIN +
|
||||||
"/auth/webauthn/register?token=" +
|
"/auth/webauthn/register?token=" +
|
||||||
token +
|
token +
|
||||||
"&email=" +
|
"&email=" +
|
||||||
userInDb.email
|
userInDb.email;
|
||||||
}">here</a> to reset.</p><p>The above link expires in 48 hours</p>`
|
|
||||||
|
const sent = await sendMail(
|
||||||
|
userInDb.email,
|
||||||
|
"Quicker Permits account reset",
|
||||||
|
`<p>Click <a href="${URL}">here</a> to reset.</p><p>The above link expires in 48 hours</p>
|
||||||
|
<p>Go to this URL is the above link doesn't work: <span>${URL}</span></p>`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user