소스 검색

去除uid参数

peng 2 년 전
부모
커밋
92c2990dd4
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  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))