diff --git a/database/crud.py b/database/crud.py index 021b447..e264bcb 100644 --- a/database/crud.py +++ b/database/crud.py @@ -66,8 +66,8 @@ async def activate_account(data: OTPSchema): async def verify_otp(data: OTPSchema): user = fetch_otp(data=data) - stored.otp = user.otp - if stored_otp == otp: - activate_account(mobile=mobile) + stored_otp = user.otp + if stored_otp == data.otp: + activate_account(mobile=data.mobile) return True return False