From 901748cd37c3c75ba5465fbb4f08486ca4ad9ca3 Mon Sep 17 00:00:00 2001 From: Sylvain Gaudan Date: Mon, 2 Sep 2024 16:41:44 +0200 Subject: [PATCH] update with new version of organisations endpoints --- arlas/cli/service.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arlas/cli/service.py b/arlas/cli/service.py index 1f983e3..c7277fd 100644 --- a/arlas/cli/service.py +++ b/arlas/cli/service.py @@ -150,19 +150,13 @@ def list_indices(arlas: str) -> list[list[str]]: def set_collection_visibility(arlas: str, collection: str, public: bool): description = Service.__arlas__(arlas, "/".join(["explore", collection, "_describe"])) doc = { - "organisations": { - "shared": description.get("params", {}).get("organisations", {}).get("shared", []), - "public": public - } + "shared": description.get("params", {}).get("organisations", {}).get("shared", []), + "public": public } return Service.__arlas__(arlas, "/".join(["collections", collection, "organisations"]), patch=json.dumps(doc)).get("params", {}).get("organisations", {}).get("public") def set_collection_display_name(arlas: str, collection: str, name: str): - doc = { - "display_names": { - "collection": name - } - } + doc = name return Service.__arlas__(arlas, "/".join(["collections", collection, "display_names"]), patch=json.dumps(doc)).get("params", {}).get("display_names", {}).get("collection") def share_with(arlas: str, collection: str, organisation: str):