mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-01 11:31:28 +00:00
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:
parent
bacaa59725
commit
066f22ff35
@ -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)),
|
||||
]
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user