mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1022 from Salamandar/stretch-unstable
Add default domain to API response
This commit is contained in:
commit
eceb0aeca9
1 changed files with 5 additions and 1 deletions
|
@ -62,7 +62,6 @@ def domain_list(exclude_subdomains=False):
|
|||
|
||||
result_list.append(domain)
|
||||
|
||||
|
||||
def cmp_domain(domain1, domain2):
|
||||
# Keep the main part of the domain and the extension together
|
||||
# eg: this.is.an.example.com -> ['example.com', 'an', 'is', 'this']
|
||||
|
@ -77,6 +76,11 @@ def domain_list(exclude_subdomains=False):
|
|||
result_list = sorted(result_list, cmp_domain)
|
||||
|
||||
return {'domains': result_list}
|
||||
|
||||
return {
|
||||
'domains': result_list,
|
||||
'main': _get_maindomain()
|
||||
}
|
||||
|
||||
|
||||
@is_unit_operation()
|
||||
|
|
Loading…
Add table
Reference in a new issue