diff --git a/plinth/modules/api/urls.py b/plinth/modules/api/urls.py index b25a2d55f..f0cb66038 100644 --- a/plinth/modules/api/urls.py +++ b/plinth/modules/api/urls.py @@ -10,6 +10,4 @@ from plinth.modules.api import views urlpatterns = [ re_path(r'^api/(?P[0-9]+)/shortcuts/?$', public(views.shortcuts)), - re_path(r'^api/(?P[0-9]+)/access-info/?$', - public(views.access_info)), ] diff --git a/plinth/modules/api/views.py b/plinth/modules/api/views.py index ac3aff0fd..176f80b73 100644 --- a/plinth/modules/api/views.py +++ b/plinth/modules/api/views.py @@ -7,22 +7,10 @@ import copy import json from django.core.serializers.json import DjangoJSONEncoder -from django.http import HttpRequest, HttpResponse +from django.http import HttpResponse from django.templatetags.static import static from plinth import frontpage -from plinth.modules import names - - -def access_info(request: HttpRequest, **kwargs) -> HttpResponse: - """API view to return a list of domains and types.""" - 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') def shortcuts(request, **kwargs):