Explorar el Código

app诊断接口,对uid进行截取处理

tanghongbin hace 4 años
padre
commit
05b44b0651
Se han modificado 1 ficheros con 6 adiciones y 2 borrados
  1. 6 2
      Controller/AppLogController.py

+ 6 - 2
Controller/AppLogController.py

@@ -71,10 +71,14 @@ class AppLogView(View):
         if uid is None or average_delay is None or status is None or filename is None:
             return response.json(444)
         else:
-            ModelService.app_log_log(userID, uid)
+            if len(uid) < 20:
+                return response.json(444, 'uid')
+
+            # ModelService.app_log_log(userID, uid)
             now_time = int(time.time())
+            uid = uid.strip()
             data = {
-                'uid': uid.strip(),
+                'uid': uid[0:20],
                 'average_delay': average_delay,
                 'status': status,
                 'filename': filename,