Skip to content

Commit

Permalink
error on login if token is missing (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: Moser Marco Julian <marco.moser@smaxtec.com>
  • Loading branch information
Mopsgeschwindigkeit and Moser Marco Julian authored Oct 13, 2023
1 parent 4fa202e commit 96623c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sxapi/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ def api_status():
Print online status of api/v2 and integration/v2
"""

if not cli_user.api_access_token:
print("No credentials set. Use --help for more information.")
return

pub_resp = cli_user.public_v2_api.get("/service/status")
int_resp = cli_user.integration_v2_api.get("/service/status")

Expand Down

0 comments on commit 96623c2

Please sign in to comment.