Przeglądaj źródła

修复设备上传日志接口存在问题

locky 3 lat temu
rodzic
commit
af3ef48193
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      Controller/DeviceLogController.py

+ 3 - 3
Controller/DeviceLogController.py

@@ -15,12 +15,12 @@ class DeviceLogView(View):
     def get(self, request, *args, **kwargs):
         request.encoding = 'utf-8'
         operation = kwargs.get('operation', None)
-        return self.validate(request.GET, operation)
+        return self.validate(request, request.GET, operation)
 
     def post(self, request, *args, **kwargs):
         request.encoding = 'utf-8'
         operation = kwargs.get('operation', None)
-        return self.validate(request.POST, operation)
+        return self.validate(request, request.POST, operation)
 
     def validate(self, request, request_dict, operation):
         response = ResponseObject()
@@ -39,7 +39,7 @@ class DeviceLogView(View):
 
     def getUploadUrl(self, request_dict, response):
         uid = request_dict.get('uid', None)
-        file_type = request_dict.get('log_type', None)
+        file_type = request_dict.get('file_type', None)
 
         if not all([uid, file_type]):
             return response.json(444)