|
|
@ -92,7 +92,7 @@ class config_api: |
|
|
|
def setPanelDomainApi(self): |
|
|
|
def setPanelDomainApi(self): |
|
|
|
domain = request.form.get('domain', '') |
|
|
|
domain = request.form.get('domain', '') |
|
|
|
|
|
|
|
|
|
|
|
cfg_domain = 'data/domain.conf' |
|
|
|
cfg_domain = 'data/bind_domain.pl' |
|
|
|
if domain == '': |
|
|
|
if domain == '': |
|
|
|
os.remove(cfg_domain) |
|
|
|
os.remove(cfg_domain) |
|
|
|
return mw.returnJson(True, '清空域名成功!') |
|
|
|
return mw.returnJson(True, '清空域名成功!') |
|
|
@ -629,6 +629,13 @@ class config_api: |
|
|
|
else: |
|
|
|
else: |
|
|
|
data['basic_auth'] = '' |
|
|
|
data['basic_auth'] = '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cfg_domain = 'data/bind_domain.pl' |
|
|
|
|
|
|
|
if os.path.exists(cfg_domain): |
|
|
|
|
|
|
|
domain = mw.readFile(cfg_domain) |
|
|
|
|
|
|
|
data['bind_domain'] = domain.strip() |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
data['bind_domain'] = '' |
|
|
|
|
|
|
|
|
|
|
|
api_token = self.__api_addr |
|
|
|
api_token = self.__api_addr |
|
|
|
if os.path.exists(api_token): |
|
|
|
if os.path.exists(api_token): |
|
|
|
bac = mw.readFile(api_token) |
|
|
|
bac = mw.readFile(api_token) |
|
|
|