mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-06 02:29:59 +02:00
Fix #982: Removed "nodeinfo disabled" setting, as nodeinfo is required for the UI to work
This commit is contained in:
parent
dd9cca432d
commit
175d701247
7 changed files with 1 additions and 36 deletions
|
@ -127,21 +127,6 @@ class RavenDSN(types.StringPreference):
|
|||
field_kwargs = {"required": False}
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class InstanceNodeinfoEnabled(types.BooleanPreference):
|
||||
show_in_api = False
|
||||
section = instance
|
||||
name = "nodeinfo_enabled"
|
||||
default = True
|
||||
verbose_name = "Enable nodeinfo endpoint"
|
||||
help_text = (
|
||||
"This endpoint is needed for your about page to work. "
|
||||
"It's also helpful for the various monitoring "
|
||||
"tools that map and analyzize the fediverse, "
|
||||
"but you can disable it completely if needed."
|
||||
)
|
||||
|
||||
|
||||
@global_preferences_registry.register
|
||||
class InstanceNodeinfoPrivate(types.BooleanPreference):
|
||||
show_in_api = False
|
||||
|
|
|
@ -4,7 +4,6 @@ from dynamic_preferences.registries import global_preferences_registry
|
|||
from rest_framework import views
|
||||
from rest_framework.response import Response
|
||||
|
||||
from funkwhale_api.common import preferences
|
||||
from funkwhale_api.users.oauth import permissions as oauth_permissions
|
||||
|
||||
from . import nodeinfo
|
||||
|
@ -38,7 +37,5 @@ class NodeInfo(views.APIView):
|
|||
authentication_classes = []
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
if not preferences.get("instance__nodeinfo_enabled"):
|
||||
return Response(status=404)
|
||||
data = nodeinfo.get()
|
||||
return Response(data, status=200, content_type=NODEINFO_2_CONTENT_TYPE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue