(
email: string,
userId: string
)
| 8 | import { VerifyEmail } from "@server/emails/templates/VerifyEmailCode"; |
| 9 | |
| 10 | export async function sendEmailVerificationCode( |
| 11 | email: string, |
| 12 | userId: string |
| 13 | ): Promise<void> { |
| 14 | const code = await generateEmailVerificationCode(userId, email); |
| 15 | |
| 16 | await sendEmail( |
| 17 | VerifyEmail({ |
| 18 | username: email, |
| 19 | verificationCode: code, |
| 20 | verifyLink: `${config.getRawConfig().app.dashboard_url}/auth/verify-email` |
| 21 | }), |
| 22 | { |
| 23 | to: email, |
| 24 | from: config.getNoReplyEmail(), |
| 25 | subject: "Verify your email address" |
| 26 | } |
| 27 | ); |
| 28 | } |
| 29 | |
| 30 | async function generateEmailVerificationCode( |
| 31 | userId: string, |
no test coverage detected