commit fcca16e8d04ff00e408d3c225d77b8afefa2a997 parent 57f578ddcd03cc8efd9c51d470b875e2ee0a6b52 Author: MS <ms@taler.net> Date: Fri, 20 Jan 2023 16:21:20 +0100 CLI Now actually adding "GET /cashouts". The previous CLI change added "GET /accounts". Diffstat:
| M | cli/bin/libeufin-cli | | | 25 | +++++++++++++++++++++++++ |
1 file changed, 25 insertions(+), 0 deletions(-)
diff --git 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()