Browse Source

云存响应结果按照lang值返回对应msg

zhangdongming 3 năm trước cách đây
mục cha
commit
541e78eebb
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      Controller/CloudStorage.py

+ 3 - 2
Controller/CloudStorage.py

@@ -91,7 +91,8 @@ class CloudStorageView(View):
         return self.validation(request.POST, request, operation)
 
     def validation(self, request_dict, request, operation):
-        response = ResponseObject()
+        lang = request_dict.get('lang', 'en')
+        response = ResponseObject(lang)
         if operation is None:
             return response.json(444, 'error path')
         elif operation == 'dopaypalcallback':  # paypal支付回调
@@ -120,7 +121,7 @@ class CloudStorageView(View):
             token = request_dict.get('token', None)
             # 设备主键uid
             tko = TokenObject(token)
-            response.lang = tko.lang
+            # response.lang = tko.lang
             if tko.code != 0:
                 return response.json(tko.code)
             userID = tko.userID