Commit 54346545 authored by Rafal's avatar Rafal

repair

parent dbdb74bf
...@@ -31,8 +31,8 @@ class APIViewSet(viewsets.ModelViewSet): ...@@ -31,8 +31,8 @@ class APIViewSet(viewsets.ModelViewSet):
@detail_route() @detail_route()
def xd(self,request, pk=None): def xd(self,request, pk=None):
api = get_object_or_404(APIViewSet.queryset, pk=pk) api = get_object_or_404(APIViewSet.queryset, pk=pk)
api_data = api.data api_data = json.loads(api.data)
return Response(status=rest_framework.status.HTTP_200_OK, data={'data': api_data}) return Response(status=rest_framework.status.HTTP_200_OK, data=api_data)
@staticmethod @staticmethod
def test(request, id, function): def test(request, id, function):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment