mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
names: Make all apps use new api to retrieve domain names
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
ab42b9b241
commit
b684b07d11
10 files changed
+28
-55
No files matched your search
@@ -32,9 +32,9 @@ from plinth.modules import names
|
||||
def access_info(request, **kwargs):
|
||||
"""API view to return a list of domains and types."""
|
||||
domains = [{
|
||||
'domain': domain,
|
||||
'type': domain_type
|
||||
} for domain_type, domains in names.domains.items() for domain in domains]
|
||||
'domain': domain.name,
|
||||
'type': domain.domain_type.component_id
|
||||
} for domain in names.components.DomainName.list()]
|
||||
response = {'domains': domains}
|
||||
|
||||
return HttpResponse(json.dumps(response), content_type='application/json')
|
||||
|
||||
Reference in new issue
Block a user