mirror of
https://github.com/certd/certd.git
synced 2026-07-31 18:07:33 +08:00
chore: 优化代码格式
This commit is contained in:
@@ -53,12 +53,12 @@ export class HipmDnsmgrAccess extends BaseAccess {
|
||||
*/
|
||||
async getDomainId(domainName: string): Promise<string> {
|
||||
this.ctx.logger.info(`[HiPM DNSMgr] 尝试通过keyword查询域名: ${domainName}`);
|
||||
|
||||
|
||||
// 方案1: 使用 keyword 参数直接查询
|
||||
try {
|
||||
const resp = await this.doRequest({
|
||||
method: 'GET',
|
||||
path: '/domains',
|
||||
method: "GET",
|
||||
path: "/domains",
|
||||
params: {
|
||||
page: 1,
|
||||
pageSize: 1,
|
||||
@@ -80,7 +80,7 @@ export class HipmDnsmgrAccess extends BaseAccess {
|
||||
|
||||
// 方案2: 如果 keyword 查询未找到,使用列表匹配作为冗余
|
||||
this.ctx.logger.info(`[HiPM DNSMgr] keyword查询未找到,尝试列表匹配: ${domainName}`);
|
||||
|
||||
|
||||
const domainList = await this.getDomainList();
|
||||
const domainInfo = domainList.find((item: any) => item.domain === domainName);
|
||||
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ export class HipmDnsmgrDnsProvider extends AbstractDnsProvider<{ domainId: strin
|
||||
|
||||
// 1. 获取域名 ID(双层查询策略)
|
||||
const domainId = await this.access.getDomainId(domain);
|
||||
this.logger.debug('[HiPM DNSMgr] 找到域名:', domain, 'ID:', domainId);
|
||||
this.logger.debug("[HiPM DNSMgr] 找到域名:", domain, "ID:", domainId);
|
||||
|
||||
// 2. 创建 DNS 记录
|
||||
const name = hostRecord; // 使用子域名,如 _acme-challenge
|
||||
|
||||
Reference in New Issue
Block a user