Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nmcardoso committed Jul 28, 2024
1 parent 5ae50b4 commit 15ea85f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_token():
}

resp = session.post('https://splus.cloud/api/auth/login', json=credentials)
if resp.status == 200:
if resp.status_code == 200:
data = resp.json()
if 'token' in data:
token = data['token']
Expand Down Expand Up @@ -223,7 +223,7 @@ def plot():
query_start_time = datetime.now()
resp = session.post(query_url, headers=headers)
print('>>> Query duration:', str(datetime.now() - query_start_time))
if resp.status != 200 or 'application/json' not in resp.headers['Content-Type']:
if resp.status_code != 200 or 'application/json' not in resp.headers['Content-Type']:
return 'Query Error'

data = resp.json()
Expand Down

0 comments on commit 15ea85f

Please sign in to comment.