mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-25 20:37:48 +08:00
typos
This commit is contained in:
@@ -42,8 +42,7 @@ class CloudFlareAPI(Query):
|
|||||||
if zone_id:
|
if zone_id:
|
||||||
self.list_dns(zone_id)
|
self.list_dns(zone_id)
|
||||||
return
|
return
|
||||||
else:
|
return
|
||||||
return
|
|
||||||
elif zones_resp.json()['success']:
|
elif zones_resp.json()['success']:
|
||||||
zone_id = self.create_zone(account_id)
|
zone_id = self.create_zone(account_id)
|
||||||
if zone_id:
|
if zone_id:
|
||||||
@@ -60,14 +59,12 @@ class CloudFlareAPI(Query):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def create_zone(self, account_id):
|
def create_zone(self, account_id):
|
||||||
data = {"name": self.domain, "account": {"id": account_id}, "jump_start": True,
|
data = {"name": self.domain, "account": {"id": account_id},
|
||||||
"type": "full"}
|
"jump_start": True, "type": "full"}
|
||||||
create_zone_resp = self.post(
|
create_zone_resp = self.post(self.addr + 'zones', json=data, check=False)
|
||||||
self.addr + 'zones', json=data, check=False)
|
|
||||||
if not create_zone_resp:
|
if not create_zone_resp:
|
||||||
logger.log('DEBUG',
|
logger.log('DEBUG', f'{create_zone_resp.status_code} {create_zone_resp.text}')
|
||||||
f'{create_zone_resp.status_code} {create_zone_resp.text}')
|
return False
|
||||||
return
|
|
||||||
if create_zone_resp.json()['success']:
|
if create_zone_resp.json()['success']:
|
||||||
return create_zone_resp.json()['result']['id']
|
return create_zone_resp.json()['result']['id']
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user