diff --git a/src/modules/host/handlers/Host_Admin/onboarding/verifyOTP.ts b/src/modules/host/handlers/Host_Admin/onboarding/verifyOTP.ts index eb4f9cf..8233d23 100644 --- a/src/modules/host/handlers/Host_Admin/onboarding/verifyOTP.ts +++ b/src/modules/host/handlers/Host_Admin/onboarding/verifyOTP.ts @@ -27,8 +27,10 @@ export const handler = safeHandler(async ( throw new ApiError(400, 'Email and OTP are required'); } - await hostService.verifyHostOtp(email, otp); - const user = await hostService.getHostByEmail(email); + const emailToLowerCase = email.toLowerCase(); + + await hostService.verifyHostOtp(emailToLowerCase, otp); + const user = await hostService.getHostByEmail(emailToLowerCase); const generateTokenForHost = await tokenService.generateAuthToken( user.id );