|
@@ -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:
|