Browse Source

去除uid参数

peng 2 năm trước cách đây
mục cha
commit
92c2990dd4
1 tập tin đã thay đổi với 1 bổ sung3 xóa
  1. 1 3
      Controller/DetectController.py

+ 1 - 3
Controller/DetectController.py

@@ -43,12 +43,10 @@ class NotificationView(View):
         n_time = request_dict.get('n_time', None)
         event_type = request_dict.get('event_type', None)
         is_st = request_dict.get('is_st', None)
-        uid = request_dict.get('uid', None)
         if not all([channel, n_time]):
             return JsonResponse(status=200, data={'code': 444, 'msg': 'error channel or n_time'})
         try:
-            if not uid:
-                uid = DevicePushService.decode_uid(etk, uidToken)  # 解密uid
+            uid = DevicePushService.decode_uid(etk, uidToken)  # 解密uid
             if len(uid) != 20 and len(uid) != 14:
                 return JsonResponse(status=200, data={'code': 404, 'msg': 'wrong uid'})
             logger.info("旧移动侦测接口的uid:{}".format(uid))