|
@@ -41,7 +41,7 @@ class ConfirmRegion(TemplateView):
|
|
|
if not device_domain_qs.exists():
|
|
|
DeviceDomainModel.objects.create(ip=ip, country_name=country_code, api=api)
|
|
|
|
|
|
- return response.json(0, {'request_api_url': api, 'push_api': push_api})
|
|
|
+ return response.json(0, {'request_api_url': api, 'push_api_url': push_api})
|
|
|
|
|
|
# 不存在则返回美洲域名
|
|
|
region_qs = RegionModel.objects.filter(continent_code='NA').values('api', 'push_api')
|
|
@@ -51,10 +51,11 @@ class ConfirmRegion(TemplateView):
|
|
|
if not device_domain_qs.exists():
|
|
|
DeviceDomainModel.objects.create(ip=ip, country_name='NA', api=api)
|
|
|
|
|
|
- return response.json(0, {'request_api_url': api, 'push_api': push_api})
|
|
|
+ return response.json(0, {'request_api_url': api, 'push_api_url': push_api})
|
|
|
except Exception as e:
|
|
|
print(e)
|
|
|
- return response.json(0, {'request_api_url': 'https://www.dvema.com', 'push_api': 'https://push.dvema.com'})
|
|
|
+ return response.json(0, {'request_api_url': 'https://www.dvema.com',
|
|
|
+ 'push_api_url': 'https://push.dvema.com'})
|
|
|
|
|
|
|
|
|
# 根据设备的ip返回域名和地区id
|