Explorar el Código

kvs pc端查询登录成功后删除redis uuid和token
欧洲配置文件增加推送云相册存储桶

peng hace 2 años
padre
commit
82094ae545
Se han modificado 2 ficheros con 4 adiciones y 1 borrados
  1. 1 0
      Ansjer/eur_config/config_formal.py
  2. 3 1
      Controller/AWS/KVSController.py

+ 1 - 0
Ansjer/eur_config/config_formal.py

@@ -20,6 +20,7 @@ PUSH_BUCKET = 'foreignpush'                         # 推送存储桶
 PUSH_INACCURATE_BUCKET = 'push-inaccurate'          # 推送不准确存储桶
 AVATAR_BUCKET = 'avatar-us'                         # 头像存储桶
 LOG_BUCKET = 'ansjer-statres'                       # 日志存储桶
+PUSH_CLOUD_PHOTO = 'push-cloud-photo'               # 推送云相册存储桶
 
 # redis节点
 SERVER_HOST = 'server-redis-001.av1kep.0001.euw1.cache.amazonaws.com'

+ 3 - 1
Controller/AWS/KVSController.py

@@ -152,6 +152,8 @@ class UserRelatedView(View):
                 user_id = token_obj.userID
                 user_icon_url, nick_name = UserRelatedView.get_user_info(user_id)
                 res = {'status': 1, 'userIconUrl': user_icon_url, 'nickName': nick_name}
+                redis_obj.del_data(uuid_number)
+                redis_obj.del_data(uuid_number + 'token')
             else:  # 未登录
                 res = {'status': 0}
             return response.json(0, res)
@@ -182,7 +184,7 @@ class UserRelatedView(View):
             ttl = redis_obj.get_ttl(uuid_number)
             if token is False or ttl == 0:
                 return response.json(119)
-            result = redis_obj.set_ex_data(uuid_number, 2, ttl)
+            result = redis_obj.set_ex_data(uuid_number, 2, ttl)  # 修改uuid状态为已登录
             if result is False:
                 return response.json(119)
             token_obj = TokenObject(token)