Skip to content

Commit

Permalink
fix response field
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Barbosa committed Nov 28, 2024
1 parent e46824f commit 1860270
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions marketplace/core/types/emails/gmail/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ def to_channel_data(self):
url += f"&oauth_token={self.validated_data['access_token']}"
url += "&alt=json&prettyPrint=true"
response = requests.get(url=url)
if response.status == 200:
if response.status_code == 200:
print(f"successfull using: {url}")
else:
print(f"error in second try: {response.json()}")
url = "https://www.googleapis.com/oauth2/v1/userinfo?access_token="
url += {self.validated_data['access_token']}
response = requests.get(url=url)
if response == 200:
if response.status_code == 200:
print(f"sucess using: {url}")
else:
print(f"error in third try: {response.json}")
Expand Down

0 comments on commit 1860270

Please sign in to comment.