@@ -3,7 +3,7 @@ import { logger } from '../../utils/logger';
33import { emailSchema , registerSchema } from './auth.schema' ;
44import { sendOtpEmail } from '../../Services/email.service' ;
55import { generateotp } from '../../utils/otp' ;
6- import { appDataSouce } from '../../data-source' ;
6+ import { appDataSource } from '../../data-source' ;
77import { Otp } from '../../entities/opt' ;
88import { User } from '../../entities/User' ;
99
@@ -20,7 +20,7 @@ export const sendOtp = async (
2020 . status ( 400 )
2121 . json ( { message : 'validation vailed' , error : result . error ?. format ( ) } ) ;
2222 }
23- const otpRep = appDataSouce . getRepository ( Otp ) ;
23+ const otpRep = appDataSource . getRepository ( Otp ) ;
2424 const otpcode = generateotp ( ) ;
2525 logger . debug ( { otpcode } , 'otp is' ) ;
2626 const email = result . data ?. email ;
@@ -49,7 +49,7 @@ export const verifyotp = async (
4949 return res . status ( 400 ) . json ( { message : ' otp and email are required' } ) ;
5050 }
5151
52- const otpRepo = appDataSouce . getRepository ( Otp ) ;
52+ const otpRepo = appDataSource . getRepository ( Otp ) ;
5353 const otpRecord = await otpRepo . findOne ( {
5454 where : {
5555 email,
@@ -101,8 +101,8 @@ export const register = async (
101101 if ( ! otpId ) {
102102 return res . status ( 400 ) . json ( { message : 'otpid requuired' } ) ;
103103 }
104- const otpRepo = appDataSouce . getRepository ( Otp ) ;
105- const userRepo = appDataSouce . getRepository ( User ) ;
104+ const otpRepo = appDataSource . getRepository ( Otp ) ;
105+ const userRepo = appDataSource . getRepository ( User ) ;
106106
107107 const otpRecord = await otpRepo . findOne ( {
108108 where : { id : otpId } ,
0 commit comments