Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
Update abstra-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
abstra-bot committed May 9, 2023
1 parent 465d20b commit ad2bd14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions abstra_cli/apis/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@

def get_auth_info():
api_token = credentials.get_credentials()
if not api_token:
return None, None, None
headers = credentials.get_auth_headers(api_token)

if headers is None:
return None, None, None

response = requests.get(f"https://auth.abstra.cloud/abstra-cloud", headers=headers)
response_json = response.json()
if response_json is None:
Expand Down
2 changes: 1 addition & 1 deletion abstra_cli/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def get_auth_headers(api_token=None):
return {"content-type": "application/json", "API-Authorization": api_token}

print("No API token found. Please login with `abstra login`")
sys.exit(1)
return None

0 comments on commit ad2bd14

Please sign in to comment.