Skip to content

Commit

Permalink
feat: fix authenticate_credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
helllllllder committed Oct 17, 2024
1 parent 61e8865 commit cb2d505
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions chats/apps/accounts/authentication/drf/authorization.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,7 @@ def authenticate_credentials(self, key):
authorization = ProjectAdminDTO(**cache_authorization)
return (authorization.user_email, authorization)

auth_instance = self._authenticate_credentials(key)[1]
authorization = ProjectAdminDTO(
pk=str(auth_instance.pk),
project=str(auth_instance.project_id),
user_email=auth_instance.user_id,
user_first_name=auth_instance.user.first_name,
role=auth_instance.role,
)
authorization = self._authenticate_credentials(key)[1]
redis_connection.set(key, json.dumps(dict(authorization)), self.cache_ttl)

return (authorization.user_email, authorization)

0 comments on commit cb2d505

Please sign in to comment.