|
@@ -166,7 +166,8 @@ class DetectControllerView(View):
|
|
UidPushModel.objects.filter(userID_id=userID, m_code=m_code, uid_set__uid=uid). \
|
|
UidPushModel.objects.filter(userID_id=userID, m_code=m_code, uid_set__uid=uid). \
|
|
update(**uid_push_update_dict)
|
|
update(**uid_push_update_dict)
|
|
if status == 0:
|
|
if status == 0:
|
|
- return response.json(0, 'close')
|
|
|
|
|
|
+ # 关闭成功
|
|
|
|
+ return response.json(0)
|
|
utko = UidTokenObject()
|
|
utko = UidTokenObject()
|
|
# right
|
|
# right
|
|
utko.generate(data={'uid': uid})
|
|
utko.generate(data={'uid': uid})
|
|
@@ -202,7 +203,7 @@ class DetectControllerView(View):
|
|
# 绑定设备推送
|
|
# 绑定设备推送
|
|
UidPushModel.objects.create(**uid_push_create_dict)
|
|
UidPushModel.objects.create(**uid_push_create_dict)
|
|
if status == 0:
|
|
if status == 0:
|
|
- return response.json(0, 'close')
|
|
|
|
|
|
+ return response.json(0)
|
|
utko = UidTokenObject()
|
|
utko = UidTokenObject()
|
|
utko.generate(data={'uid': uid})
|
|
utko.generate(data={'uid': uid})
|
|
detectUrl = "{DETECT_PUSH_DOMAIN}notify/push?uidToken={uidToken}". \
|
|
detectUrl = "{DETECT_PUSH_DOMAIN}notify/push?uidToken={uidToken}". \
|