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
@@ -111,12 +111,9 @@ def diagnose():
|
||||
"""Run diagnostics and return the results."""
|
||||
results = []
|
||||
|
||||
for domain_type, domains in names.domains.items():
|
||||
if domain_type == 'hiddenservice':
|
||||
continue
|
||||
|
||||
for domain in domains:
|
||||
results.append(action_utils.diagnose_url('https://' + domain))
|
||||
for domain in names.components.DomainName.list():
|
||||
if domain.domain_type.can_have_certificate:
|
||||
results.append(action_utils.diagnose_url('https://' + domain.name))
|
||||
|
||||
return results
|
||||
|
||||
@@ -203,13 +200,9 @@ def get_status():
|
||||
status = actions.superuser_run('letsencrypt', ['get-status'])
|
||||
status = json.loads(status)
|
||||
|
||||
for domain_type, domains in names.domains.items():
|
||||
# XXX: Remove when Let's Encrypt supports .onion addresses
|
||||
if domain_type == 'hiddenservice':
|
||||
continue
|
||||
|
||||
for domain in domains:
|
||||
status['domains'].setdefault(domain, {})
|
||||
for domain in names.components.DomainName.list():
|
||||
if domain.domain_type.can_have_certificate:
|
||||
status['domains'].setdefault(domain.name, {})
|
||||
|
||||
return status
|
||||
|
||||
|
||||
Reference in new issue
Block a user