|
@@ -97,6 +97,7 @@ class NotificationView(View):
|
|
|
# operation = kwargs.get('operation')
|
|
|
return self.validation(request.GET)
|
|
|
|
|
|
+
|
|
|
def post(self, request, *args, **kwargs):
|
|
|
request.encoding = 'utf-8'
|
|
|
# operation = kwargs.get('operation')
|
|
@@ -197,7 +198,9 @@ class NotificationView(View):
|
|
|
appBundleId = uaql['appBundleId']
|
|
|
token_val = uaql['token_val']
|
|
|
uid = uaql['uid']
|
|
|
- gcm_config = {'xxx': 'key'}
|
|
|
+ gcm_config = {
|
|
|
+ 'xxx': 'key'
|
|
|
+ }
|
|
|
serverKey = gcm_config[appBundleId]
|
|
|
|
|
|
msg = {'n_time': n_time, 'uid': uid}
|
|
@@ -222,7 +225,9 @@ class NotificationView(View):
|
|
|
n_time = request_dict.get('n_time')
|
|
|
appBundleId = uaql['appBundleId']
|
|
|
uid = uaql['uid']
|
|
|
- apns_config = {'appbundleId': {'pem_path': 'xxxx', 'topic': 'topic'}}
|
|
|
+ apns_config = {
|
|
|
+ 'appbundleId': {'pem_path': 'xxxx', 'topic': 'topic'}
|
|
|
+ }
|
|
|
try:
|
|
|
# daytime = time.strftime("%Y%m%d%H%M", time.localtime(1547256103))
|
|
|
# print(daytime)
|