Fix return data for expired code user

This commit is contained in:
sabaimran 2024-12-16 17:33:53 -08:00
parent efb0b9f495
commit d17a9ba4c8

View file

@ -275,7 +275,7 @@ async def aget_user_validated_by_email_verification_code(code: str, email: str)
return None, False return None, False
if user.email_verification_code_expiry < datetime.now(tz=timezone.utc): if user.email_verification_code_expiry < datetime.now(tz=timezone.utc):
return None, True return user, True
user.email_verification_code = None user.email_verification_code = None
user.verified_email = True user.verified_email = True