From 1de43b07786928f630f4714ebd8664c673126969 Mon Sep 17 00:00:00 2001 From: jb-alvarado Date: Fri, 10 Apr 2020 12:20:23 +0200 Subject: [PATCH] cleanup --- ffplayout/api/views.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ffplayout/api/views.py b/ffplayout/api/views.py index aba93e55..bb254456 100644 --- a/ffplayout/api/views.py +++ b/ffplayout/api/views.py @@ -5,7 +5,6 @@ import yaml from django.conf import settings from rest_framework.response import Response from rest_framework.views import APIView -from rest_framework.permissions import AllowAny from .utils import SystemStats, get_media_path @@ -16,7 +15,6 @@ def read_config(path): class Config(APIView): - permission_classes = (AllowAny,) """ read and write config from ffplayout engine for reading endpoint is: http://127.0.0.1:8000/api/config/?config @@ -35,11 +33,9 @@ class Config(APIView): return Response({"success": False}) def post(self, request, *args, **kwargs): - if 'config' in request.POST.dict(): - pass - print(request.query_params) - print(args) - print(kwargs) + if 'data' in request.data: + # TODO: do save data to config + print(request.data['data']) return Response({"success": False})