mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 15:31:12 +08:00
修复网宿API验证失败的问题 (#250)
* 变更网宿check方法调用的API接口以避免产品未开通导致验证失败 * 兼容网宿CDN接口使用result作为失败返回值的场景
This commit is contained in:
parent
5aab54c79e
commit
7f370a095d
@ -24,7 +24,7 @@ class wangsu implements DeployInterface
|
||||
public function check()
|
||||
{
|
||||
if (empty($this->username) || empty($this->apiKey)) throw new Exception('必填参数不能为空');
|
||||
$this->request('/cdn/certificates');
|
||||
$this->request('/api/ssl/certificate');
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -452,6 +452,9 @@ class wangsu implements DeployInterface
|
||||
} elseif (isset($result['message'])) {
|
||||
throw new Exception($result['message']);
|
||||
|
||||
} elseif (isset($result['result'])) {
|
||||
throw new Exception($result['result']);
|
||||
|
||||
} else {
|
||||
throw new Exception('请求失败');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user