feat: create confirm user page, option to resend email if link expires

This commit is contained in:
Aaron William Po
2023-05-29 15:51:59 -04:00
parent bc298bce0e
commit 06ae380b8f
9 changed files with 210 additions and 41 deletions

View File

@@ -15,7 +15,7 @@ const findUserById = async (id: string) => {
dateOfBirth: true,
createdAt: true,
accountIsVerified: true,
updatedAt: true
updatedAt: true,
},
});

View File

@@ -14,7 +14,7 @@ const sendConfirmationEmail = async ({ id, username, email }: UserSchema) => {
const subject = 'Confirm your email';
const name = username;
const url = `${BASE_URL}/api/users/confirm?token=${confirmationToken}`;
const url = `${BASE_URL}/users/confirm?token=${confirmationToken}`;
const address = email;
const html = render(Welcome({ name, url, subject })!);