fixed the registration api

This commit is contained in:
2025-11-27 16:56:28 +05:30
parent fb392369a5
commit 67da5b57e6
3 changed files with 14 additions and 23 deletions

View File

@@ -55,6 +55,7 @@ export const handler = safeHandler(async (
}
const otpResult = await generateOtpHelper(
prismaService, // ⭐ pass Prisma from here
Number(newUser?.id),
newUser?.emailAddress,
'Register',
@@ -62,6 +63,7 @@ export const handler = safeHandler(async (
5
);
if (!otpResult || !otpResult.otp) {
throw new ApiError(500, 'Failed to send OTP');
}