Преглед на файлове

修改redis传参问题

peng преди 2 години
родител
ревизия
1df835d442
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      Controller/AWS/KVSController.py

+ 2 - 2
Controller/AWS/KVSController.py

@@ -77,7 +77,7 @@ class UserRelatedView(View):
         try:
             redis_obj = RedisObject()
             status = redis_obj.get_data(uuid_number)
-            if status == 0:
+            if status == '0':
                 return response.json(18)
             elif status is False:
                 return response.json(119)
@@ -105,7 +105,7 @@ class UserRelatedView(View):
             status = redis_obj.get_data(uuid_number)
             if status is False:
                 return response.json(119)
-            flag = redis_obj.set_ex_data(uuid_number, token)
+            flag = redis_obj.set_ex_data(uuid_number, token, 300)
             if flag is False:
                 return response.json(309)
             return response.json(0)