mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 19:09:16 +02:00
Fixed #82: Basic instance states are now available on /about
This commit is contained in:
parent
c89212379d
commit
d875f0d070
7 changed files with 259 additions and 0 deletions
|
@ -4,6 +4,8 @@ from rest_framework.response import Response
|
|||
from dynamic_preferences.api import serializers
|
||||
from dynamic_preferences.registries import global_preferences_registry
|
||||
|
||||
from . import stats
|
||||
|
||||
|
||||
class InstanceSettings(views.APIView):
|
||||
permission_classes = []
|
||||
|
@ -23,3 +25,12 @@ class InstanceSettings(views.APIView):
|
|||
data = serializers.GlobalPreferenceSerializer(
|
||||
api_preferences, many=True).data
|
||||
return Response(data, status=200)
|
||||
|
||||
|
||||
class InstanceStats(views.APIView):
|
||||
permission_classes = []
|
||||
authentication_classes = []
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
data = stats.get()
|
||||
return Response(data, status=200)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue