From 5dfed4d592f42cb14f13ed35e7bb85f22cb12b83 Mon Sep 17 00:00:00 2001 From: luolu Date: Tue, 26 Jul 2022 09:52:51 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20get=20arkstore=20app=20de?= =?UTF-8?q?tail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arkid/common/arkstore.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arkid/common/arkstore.py b/arkid/common/arkstore.py index 66fe53160..8d1920857 100644 --- a/arkid/common/arkstore.py +++ b/arkid/common/arkstore.py @@ -455,6 +455,17 @@ def create_tenant_app(tenant, saas_app): return app + +def get_arkstore_app_detail(access_token, app_id): + arkstore_extensions_url = settings.ARKSTOER_URL + f'/api/v1/arkstore/apps/{app_id}/download' + headers = {'Authorization': f'Token {access_token}'} + params = {} + resp = requests.get(arkstore_extensions_url, params=params, headers=headers) + if resp.status_code != 200: + raise Exception(f'Error get_arkstore_extension_detail: {resp.status_code}') + resp = resp.json() + return resp + def get_arkid_saas_app_detail(tenant, token, extension_id): saas_token, saas_tenant_id, saas_tenant_slug = get_saas_token(tenant, token)