mirror of
https://github.com/certd/certd.git
synced 2026-05-16 13:17:29 +08:00
perf: 支持雨云dns解析
This commit is contained in:
@@ -60,10 +60,24 @@ export class RainyunAccess extends BaseAccess {
|
||||
"domains.Domain": req.query??""
|
||||
},
|
||||
}
|
||||
return await this.doRequest({
|
||||
const res = await this.doRequest({
|
||||
url: `/product/domain/?options=${encodeURIComponent(JSON.stringify(options))}`,
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
return {
|
||||
total: res.TotalRecords,
|
||||
list: res.Records || []
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async getDomainId(domain:string){
|
||||
const res = await this.getDomainList({query: domain,size:1});
|
||||
if (res.list.length === 0) {
|
||||
throw new Error(`域名${domain}不存在 ` );
|
||||
}
|
||||
return res.list[0].ID;
|
||||
}
|
||||
|
||||
async doRequest(req:HttpRequestConfig){
|
||||
|
||||
Reference in New Issue
Block a user