|
@@ -25,7 +25,7 @@ from django.views.decorators.csrf import csrf_exempt
|
|
|
from django.views.generic import TemplateView
|
|
|
from ratelimit.decorators import ratelimit
|
|
|
|
|
|
-from Ansjer.config import AuthCode_Expire, SERVER_DOMAIN, APNS_CONFIG, JPUSH_CONFIG, FCM_CONFIG,TUTK_PUSH_DOMAIN
|
|
|
+from Ansjer.config import AuthCode_Expire, SERVER_DOMAIN, APNS_CONFIG, JPUSH_CONFIG, FCM_CONFIG, TUTK_PUSH_DOMAIN
|
|
|
from Controller.CheckUserData import DataValid, date_handler, RandomStr
|
|
|
from Model.models import Device_User, Role, UidPushModel, UserOauth2Model, UserExModel, Device_Info
|
|
|
from Object.AWS.SesClassObject import SesClassObject
|
|
@@ -2089,9 +2089,16 @@ class V2LogoutView(TemplateView):
|
|
|
appid = request_dict.get('appid', None)
|
|
|
udid = request_dict.get('udid', None)
|
|
|
if os_type and appid and udid:
|
|
|
- tutk_push_url = "{tutk_push_domain}?cmd=mapsync&os={os_type}&appid={appid}&udid={udid}".\
|
|
|
- format(os_type=os_type, appid=appid, udid=udid,tutk_push_domain=TUTK_PUSH_DOMAIN)
|
|
|
+ tutk_push_url = "{tutk_push_domain}?cmd=mapsync&os={os_type}&appid={appid}&udid={udid}". \
|
|
|
+ format(os_type=os_type, appid=appid, udid=udid, tutk_push_domain=TUTK_PUSH_DOMAIN)
|
|
|
res = requests.get(url=tutk_push_url)
|
|
|
+ res_s = res.text
|
|
|
+ res_s = res_s.rstrip()
|
|
|
+
|
|
|
+ if res_s == '200 Success.':
|
|
|
+ return response.json(0)
|
|
|
+ else:
|
|
|
+ return response.json(10, 'not yes')
|
|
|
return response.json(0)
|
|
|
else:
|
|
|
return response.json(tko.code)
|