Selaa lähdekoodia

对【添加接口】添加过滤非法UID处理

tanghongbin 4 vuotta sitten
vanhempi
commit
f45213c1a1
2 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 1 0
      Controller/EquipmentManager.py
  2. 1 0
      Controller/EquipmentManagerV3.py

+ 1 - 0
Controller/EquipmentManager.py

@@ -378,6 +378,7 @@ def addInterface(request):
                     asy = threading.Thread(target=ModelService.add_log,
                     asy = threading.Thread(target=ModelService.add_log,
                                            args=(CommonService.get_ip_address(request), userID, 'addV1'))
                                            args=(CommonService.get_ip_address(request), userID, 'addV1'))
                     asy.start()
                     asy.start()
+                    return response.json(10, 'illegal uid: {uid}'.format(uid=UID))
                 pass
                 pass
                 # is_bind = Device_Info.objects.filter(UID=UID, isShare=False)
                 # is_bind = Device_Info.objects.filter(UID=UID, isShare=False)
                 # # 判断是否有已绑定用户
                 # # 判断是否有已绑定用户

+ 1 - 0
Controller/EquipmentManagerV3.py

@@ -77,6 +77,7 @@ class EquipmentManagerV3(View):
                         asy = threading.Thread(target=ModelService.add_log,
                         asy = threading.Thread(target=ModelService.add_log,
                                                args=(CommonService.get_ip_address(request), userID, 'addV3'))
                                                args=(CommonService.get_ip_address(request), userID, 'addV3'))
                         asy.start()
                         asy.start()
+                        return response.json(10, 'illegal uid: {uid}'.format(uid=UID))
                     # is_bind = Device_Info.objects.filter(UID=UID, isShare=False)
                     # is_bind = Device_Info.objects.filter(UID=UID, isShare=False)
                     # # 判断是否有已绑定用户
                     # # 判断是否有已绑定用户
                     # if is_bind:
                     # if is_bind: