Fix OTP verification
This commit is contained in:
		
							parent
							
								
									9638037ece
								
							
						
					
					
						commit
						740a81be7c
					
				@ -66,8 +66,8 @@ async def activate_account(data: OTPSchema):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
async def verify_otp(data: OTPSchema):
 | 
					async def verify_otp(data: OTPSchema):
 | 
				
			||||||
    user = fetch_otp(data=data)
 | 
					    user = fetch_otp(data=data)
 | 
				
			||||||
    stored.otp = user.otp
 | 
					    stored_otp = user.otp
 | 
				
			||||||
    if stored_otp == otp:
 | 
					    if stored_otp == data.otp:
 | 
				
			||||||
        activate_account(mobile=mobile)
 | 
					        activate_account(mobile=data.mobile)
 | 
				
			||||||
        return True
 | 
					        return True
 | 
				
			||||||
    return False
 | 
					    return False
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user