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 2026-05-05 20:41:22 -07:00 committed by Joseph Nuthalapati
parent bacaa59725
commit 066f22ff35
No known key found for this signature in database
GPG Key ID: 5398F00A2FA43C35
2 changed files with 1 additions and 15 deletions

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)),
]

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):