Fix OTP verification

This commit is contained in:
coolneng 2020-07-03 13:42:15 +02:00
parent 9638037ece
commit 740a81be7c
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 3 additions and 3 deletions

View File

@ -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