diff options
author | MS <ms@taler.net> | 2023-01-20 16:21:20 +0100 |
---|---|---|
committer | MS <ms@taler.net> | 2023-01-20 16:39:59 +0100 |
commit | fcca16e8d04ff00e408d3c225d77b8afefa2a997 (patch) | |
tree | 8a5e81a62e15fdf3dd18bb6848d45ae5288c7f0c /cli | |
parent | 57f578ddcd03cc8efd9c51d470b875e2ee0a6b52 (diff) | |
download | libeufin-fcca16e8d04ff00e408d3c225d77b8afefa2a997.tar.gz libeufin-fcca16e8d04ff00e408d3c225d77b8afefa2a997.tar.bz2 libeufin-fcca16e8d04ff00e408d3c225d77b8afefa2a997.zip |
CLI
Now actually adding "GET /cashouts". The previous
CLI change added "GET /accounts".
Diffstat (limited to 'cli')
-rwxr-xr-x | cli/bin/libeufin-cli | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cli/bin/libeufin-cli b/cli/bin/libeufin-cli index 8fd3a7e4..68c38e2b 100755 --- a/cli/bin/libeufin-cli +++ b/cli/bin/libeufin-cli @@ -1928,4 +1928,29 @@ def circuit_accounts(obj): check_response_status(resp) tell_user(resp) + +@sandbox_demobank.command( + "circuit-cashouts", + help="Gets the list of all the pending and confirmed cash-out operations." +) +@click.pass_obj +def circuit_cashouts(obj): + # Check admin is requesting. + if (obj.username != "admin"): + print("Not running as 'admin'. Won't request", file=sys.stderr) + exit(1) + cashouts_endpoint = obj.circuit_api_url(f"cashouts") + try: + resp = get( + cashouts_endpoint, + **maybe_auth(obj) + ) + except Exception as e: + print(e) + print("Could not reach the bank at " + cashouts_endpoint) + exit(1) + + check_response_status(resp) + tell_user(resp) + cli() |