diff --git a/src/trpc/routers/auth/procedure/resend-email.ts b/src/trpc/routers/auth/procedure/resend-email.ts index 3a0ab4f0a..24260cbc1 100644 --- a/src/trpc/routers/auth/procedure/resend-email.ts +++ b/src/trpc/routers/auth/procedure/resend-email.ts @@ -1,4 +1,4 @@ -import { AuthVerificationEmailJob } from "@/jobs/auth-verification-email"; +import { sendAuthVerificationEmail } from "@/jobs/auth-verification-email"; import { generateVerificationToken } from "@/lib/token"; import { getVerificationTokenByEmail } from "@/server/verification-token"; @@ -19,10 +19,11 @@ export const resendEmailProcedure = withoutAuth } const verificationToken = await generateVerificationToken(input); - await new AuthVerificationEmailJob().emit({ + await sendAuthVerificationEmail({ email: verificationToken.identifier, token: verificationToken.token, }); + return { success: true, message: diff --git a/src/trpc/routers/auth/procedure/signup.ts b/src/trpc/routers/auth/procedure/signup.ts index addd96f0f..9a91b1706 100644 --- a/src/trpc/routers/auth/procedure/signup.ts +++ b/src/trpc/routers/auth/procedure/signup.ts @@ -1,4 +1,4 @@ -import { AuthVerificationEmailJob } from "@/jobs/auth-verification-email"; +import { sendAuthVerificationEmail } from "@/jobs/auth-verification-email"; import { generateVerificationToken } from "@/lib/token"; import { withoutAuth } from "@/trpc/api/trpc"; @@ -35,7 +35,7 @@ export const signupProcedure = withoutAuth }); const verificationToken = await generateVerificationToken(email); - await new AuthVerificationEmailJob().emit({ + await sendAuthVerificationEmail({ email: verificationToken.identifier, token: verificationToken.token, });