mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #402 from YunoHost/app_info_change_url
[enh] make change_url possibility available on the API for the admin
This commit is contained in:
commit
93fee93a58
1 changed files with 4 additions and 2 deletions
|
@ -330,6 +330,9 @@ def app_info(app, show_status=False, raw=False):
|
||||||
if not _is_installed(app):
|
if not _is_installed(app):
|
||||||
raise MoulinetteError(errno.EINVAL,
|
raise MoulinetteError(errno.EINVAL,
|
||||||
m18n.n('app_not_installed', app=app))
|
m18n.n('app_not_installed', app=app))
|
||||||
|
|
||||||
|
app_setting_path = APPS_SETTING_PATH + app
|
||||||
|
|
||||||
if raw:
|
if raw:
|
||||||
ret = app_list(filter=app, raw=True)[app]
|
ret = app_list(filter=app, raw=True)[app]
|
||||||
ret['settings'] = _get_app_settings(app)
|
ret['settings'] = _get_app_settings(app)
|
||||||
|
@ -345,11 +348,10 @@ def app_info(app, show_status=False, raw=False):
|
||||||
upgradable = "no"
|
upgradable = "no"
|
||||||
|
|
||||||
ret['upgradable'] = upgradable
|
ret['upgradable'] = upgradable
|
||||||
|
ret['change_url'] = os.path.exists(os.path.join(app_setting_path, "scripts", "change_url"))
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
app_setting_path = APPS_SETTING_PATH + app
|
|
||||||
|
|
||||||
# Retrieve manifest and status
|
# Retrieve manifest and status
|
||||||
with open(app_setting_path + '/manifest.json') as f:
|
with open(app_setting_path + '/manifest.json') as f:
|
||||||
manifest = json.loads(str(f.read()))
|
manifest = json.loads(str(f.read()))
|
||||||
|
|
Loading…
Add table
Reference in a new issue