瀏覽代碼

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

tanghongbin 4 年之前
父節點
當前提交
05b44b0651
共有 1 個文件被更改,包括 6 次插入2 次删除
  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,