peng пре 2 година
родитељ
комит
f9e9a86c46
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      Controller/DetectControllerV2.py

+ 2 - 3
Controller/DetectControllerV2.py

@@ -54,7 +54,6 @@ class NotificationV2View(View):
         region = request_dict.get('region', None)
         electricity = request_dict.get('electricity', '')
         time_token = request_dict.get('time_token', None)
-        time_stamp = request_dict.get('time_stamp', None)
         uid = request_dict.get('uid', None)
 
         if not all([channel, n_time]):
@@ -64,8 +63,8 @@ class NotificationV2View(View):
         if not region or not is_st:
             return JsonResponse(status=200, data={'code': 404, 'msg': 'no region or is_st'})
         # 时间戳token校验
-        if time_token and time_stamp:
-            time_stamp = int(time_stamp)
+        if time_token:
+            time_stamp = int(n_time)
             time_token = int(time_token)
             if not CommonService.check_time_stamp_token(time_token, time_stamp):
                 return JsonResponse(status=200, data={'code': 13, 'msg': 'Timestamp token verification failed'})