|
@@ -128,13 +128,16 @@ class UserRelatedView(View):
|
|
|
"""
|
|
|
uuid_number = request_dict.get('uuid', None)
|
|
|
token = request_dict.get('token', None)
|
|
|
- if not all([uuid_number, token]):
|
|
|
- return response.json(444, {'error param': 'uuid or token'})
|
|
|
+ confirm = request_dict.get('confirm', None)
|
|
|
+ if not all([uuid_number, token, confirm]):
|
|
|
+ return response.json(444, {'error param': 'uuid or token or confirm'})
|
|
|
redis_obj = RedisObject()
|
|
|
try:
|
|
|
status = redis_obj.get_data(uuid_number)
|
|
|
if status is False:
|
|
|
return response.json(119)
|
|
|
+ if confirm == '1':
|
|
|
+ redis_obj.del_data(uuid_number)
|
|
|
flag = redis_obj.set_ex_data(uuid_number, token, 300)
|
|
|
if flag is False:
|
|
|
return response.json(309)
|