mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add default domain to API response
This commit is contained in:
parent
c473902776
commit
1ff3c1cd07
1 changed files with 6 additions and 2 deletions
|
@ -61,7 +61,11 @@ def domain_list(exclude_subdomains=False):
|
|||
continue
|
||||
result_list.append(domain)
|
||||
|
||||
return {'domains': result_list}
|
||||
result_list.sort()
|
||||
return {
|
||||
'domains': result_list,
|
||||
'default': result_list.index(_get_maindomain())
|
||||
}
|
||||
|
||||
|
||||
@is_unit_operation()
|
||||
|
@ -89,7 +93,7 @@ def domain_add(operation_logger, domain, dyndns=False):
|
|||
raise YunohostError('domain_exists')
|
||||
|
||||
operation_logger.start()
|
||||
|
||||
|
||||
# Lower domain to avoid some edge cases issues
|
||||
# See: https://forum.yunohost.org/t/invalid-domain-causes-diagnosis-web-to-fail-fr-on-demand/11765
|
||||
domain = domain.lower()
|
||||
|
|
Loading…
Add table
Reference in a new issue