mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore:
This commit is contained in:
@@ -70,9 +70,10 @@ export class FarcdnAccess extends BaseAccess {
|
||||
return "ok";
|
||||
}
|
||||
}catch (e) {
|
||||
if(e.message.indexOf("null")){
|
||||
if(e.message.indexOf("11111111")>-1){
|
||||
return "ok";
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
throw "测试失败,未知错误";
|
||||
@@ -103,10 +104,12 @@ export class FarcdnAccess extends BaseAccess {
|
||||
const params = {
|
||||
sslCertId,
|
||||
};
|
||||
return await this.doRequest({
|
||||
const res= await this.doRequest({
|
||||
url: "/findSSLCertConfig",
|
||||
data: params
|
||||
});
|
||||
this.ctx.logger.info(`找到证书${sslCertId}: name=${res.name},domain=${res.commonNames},dnsNames=${res.dnsNames}`);
|
||||
return res
|
||||
}
|
||||
|
||||
async updateSSLCert(req:{
|
||||
@@ -163,10 +166,10 @@ export class FarcdnAccess extends BaseAccess {
|
||||
data: params
|
||||
});
|
||||
|
||||
if (res.data.code === 200) {
|
||||
return res.data.data;
|
||||
if (res.code === "200") {
|
||||
return res.data;
|
||||
}
|
||||
throw new Error(res.data.message);
|
||||
throw new Error(res.message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ export class FarcdnRefreshCert extends AbstractPlusTaskPlugin {
|
||||
}
|
||||
|
||||
async onGetCertList() {
|
||||
throw new Error("暂无查询证书列表接口");
|
||||
throw new Error("暂无查询证书列表接口,您需要手动输入证书id");
|
||||
// const access = await this.getAccess<FarcdnAccess>(this.accessId);
|
||||
|
||||
// const res = await access.doRequest({
|
||||
|
||||
Reference in New Issue
Block a user