lang 4 жил өмнө
parent
commit
065adbad1c

+ 4 - 1
Ansjer/config_local.py

@@ -52,7 +52,10 @@ APNS_CONFIG = {
     },
     'com.ansjer.accloud': {
         'pem_path': 'Ansjer/file/apns_pem/accloud-dev.pem',
-    }
+    },
+    'com.ansjer.customizede': {
+        'pem_path': 'Ansjer/file/apns_pem/customizede.pem',
+    },
 }
 APNS_MODE = 'dev'
 TUTK_PUSH_DOMAIN = 'http://push.iotcplatform.com/tpns'

+ 4 - 1
Ansjer/config_test.py

@@ -61,7 +61,10 @@ APNS_CONFIG = {
     },
     'com.ansjer.accloud': {
         'pem_path': 'Ansjer/file/apns_pem/accloud-dev.pem',
-    }
+    },
+    'com.ansjer.customizede': {
+        'pem_path': 'Ansjer/file/apns_pem/customizede.pem',
+    },
 }
 APNS_MODE = 'dev'
 TUTK_PUSH_DOMAIN = 'http://push.iotcplatform.com/tpns'

+ 2 - 14
Controller/UserController.py

@@ -1836,9 +1836,6 @@ class InitInfoView(View):
     # 初始化设备token
     def init_info(self, request_dict, userID, response, request):
         # 未读的系统消息
-        logger = logging.getLogger('django')
-        logger.info('init-------------begin')
-
         token_val = request_dict.get('token_val', None)
         m_code = request_dict.get('m_code', None)
         push_type = request_dict.get('push_type', None)
@@ -1849,21 +1846,12 @@ class InitInfoView(View):
         if all([token_val, push_type, appBundleId, userID]):
             push_type = int(push_type)
             if push_type == 0:
-                logger.error('------------0')
-                logger.error('into if')
-                logger.error(appBundleId)
-                logger.error(type(appBundleId))
-            if appBundleId not in APNS_CONFIG.keys():
-                logger.error('into 904')
-                return response.json(904)
+                if appBundleId not in APNS_CONFIG.keys():
+                    return response.json(904)
             elif push_type == 1:
-                logger.error('------------1')
-
                 if appBundleId not in FCM_CONFIG.keys():
                     return response.json(904)
             elif push_type == 2:
-                logger.error('------------2')
-
                 if appBundleId not in JPUSH_CONFIG.keys():
                     return response.json(904)
             else: