This commit is contained in:
xiaojunnuo
2025-05-26 22:44:56 +08:00
parent e08cf57b72
commit 86e521b9aa
7 changed files with 37 additions and 13 deletions
@@ -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({