From 066f22ff35a0822e3fc87a991f569e9f8998c40e Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 5 May 2026 20:41:22 -0700 Subject: [PATCH] api: Drop access-info API This was meant to be used by the mobile client. But it is in unmaintained and unusable state. We can re-introduce the API when mobile client is back in action. See: https://github.com/freedombox/FreedomBox/pull/1215 [Joseph] This API is not called by the mobile client, so it is safe to remove. Reviewed-by: Joseph Nuthalapati Signed-off-by: Sunil Mohan Adapa --- plinth/modules/api/urls.py | 2 -- plinth/modules/api/views.py | 14 +------------- 2 files changed, 1 insertion(+), 15 deletions(-) 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):