Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 get arkstore app detail #1071

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions arkid/common/arkstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down