summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorMS <ms@taler.net>2023-01-20 16:21:20 +0100
committerMS <ms@taler.net>2023-01-20 16:39:59 +0100
commitfcca16e8d04ff00e408d3c225d77b8afefa2a997 (patch)
tree8a5e81a62e15fdf3dd18bb6848d45ae5288c7f0c /cli
parent57f578ddcd03cc8efd9c51d470b875e2ee0a6b52 (diff)
downloadlibeufin-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-xcli/bin/libeufin-cli25
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()