Skip to content

Commit

Permalink
chore: fix verify user token
Browse files Browse the repository at this point in the history
  • Loading branch information
ZolotarevAlexandr committed Oct 27, 2024
1 parent e92a852 commit 1d320f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/repositories/auth/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ async def verify_user_token(cls, token: str) -> VerificationResult:
return VerificationResult(success=False)
user_data = await innohassle_accounts.get_user_by_innohassle_id(innohassle_id)
if user_data is None:
raise VerificationResult(success=False)
return VerificationResult(success=False)
if user_data.telegram is None:
raise VerificationResult(success=False)
return VerificationResult(success=False)
return VerificationResult(success=True, telegram_id=user_data.telegram.id)
except JoseError:
raise VerificationResult(success=False)
return VerificationResult(success=False)

@classmethod
def verify_api_token(cls, auth_token: str) -> VerificationResult:
Expand Down

0 comments on commit 1d320f7

Please sign in to comment.