commit ecaddf6a21199215e7e4dbf6058b179b70e07993
parent 7bdb0b78d3693b7574b4e0d1f83f77cbc0e31dc2
Author: MS <ms@taler.net>
Date: Tue, 11 May 2021 15:52:55 +0200
fix update of instances' auth
Diffstat:
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/bin/taler-deployment-config-instances b/bin/taler-deployment-config-instances
@@ -51,16 +51,14 @@ def ensure_instance(instance_id, name, payto_uris, auth):
urljoin(MERCHANT_BACKEND_BASE_URL, "private/instances"), json=req
)
if create_resp.status_code < 200 or create_resp.status_code >= 300:
- print(f"failed to create instance {instance_id}")
- print(create_resp.text)
- print(f"trying to PATCH instance {instance_id}")
+ print(f"Instance '{instance_id}' was already in the system. Updating its auth now")
if instance_id != "Tutorial":
- patch_resp = requests.patch(
+ patch_resp = requests.post(
urljoin(MERCHANT_BACKEND_BASE_URL,
- f"private/instances/{instance_id}"), json=req
+ f"private/instances/{instance_id}/auth"), json=auth
)
if patch_resp.status_code < 200 or patch_resp.status_code >= 300:
- print(f"failed to PATCH instance {instance_id}")
+ print(f"Failed to update auth of '{instance_id}'")
print(patch_resp.text)
exit(1)
else: