Selaa lähdekoodia

诊断日志接口,对上传的uid进行截取操作

tanghongbin 4 vuotta sitten
vanhempi
commit
9683f6e8b5
1 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 6 1
      Controller/AppLogController.py

+ 6 - 1
Controller/AppLogController.py

@@ -71,9 +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:
+            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,
+                'uid': uid[0:20],
                 'average_delay': average_delay,
                 'status': status,
                 'filename': filename,