2023-07-31 17:51:11 +00:00
|
|
|
import { sendEmailVerificationByCode } from "@calcom/features/auth/lib/verifyEmail";
|
|
|
|
|
2023-08-01 14:13:28 +00:00
|
|
|
import type { TSendVerifyEmailCodeSchema } from "./sendVerifyEmailCode.schema";
|
2023-07-31 17:51:11 +00:00
|
|
|
|
|
|
|
type SendVerifyEmailCode = {
|
|
|
|
input: TSendVerifyEmailCodeSchema;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const sendVerifyEmailCodeHandler = async ({ input }: SendVerifyEmailCode) => {
|
|
|
|
const email = await sendEmailVerificationByCode({
|
|
|
|
email: input.email,
|
|
|
|
username: input.username,
|
|
|
|
language: input.language,
|
|
|
|
});
|
|
|
|
|
|
|
|
return email;
|
|
|
|
};
|