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 <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa authored and Joseph Nuthalapati committed 2026-05-10 18:32:35 +05:30
1 parent bacaa59725
commit 066f22ff35
2 files changed
+1 -15

No files matched your search

-2
View File
@@ -10,6 +10,4 @@ from plinth.modules.api import views
urlpatterns = [
re_path(r'^api/(?P<version>[0-9]+)/shortcuts/?$', public(views.shortcuts)),
re_path(r'^api/(?P<version>[0-9]+)/access-info/?$',
public(views.access_info)),
]
+1 -13
View File
@@ -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):