mirror of
https://github.com/certd/certd.git
synced 2026-05-16 13:17:29 +08:00
perf: 新网互联支持查询域名列表
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
|
||||
import { PageRes, PageSearch } from "@certd/pipeline";
|
||||
import { AbstractDnsProvider, CreateRecordOptions, DomainRecord, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
|
||||
import { XinnetConnectAccess } from "./access.js";
|
||||
|
||||
|
||||
@@ -62,6 +63,21 @@ export class XinnetConnectDnsProvider extends AbstractDnsProvider<XinnetConnectR
|
||||
await this.access.delDnsRecord(record)
|
||||
this.logger.info(`删除域名解析成功:fullRecord=${fullRecord}`);
|
||||
}
|
||||
|
||||
async getDomainListPage(req: PageSearch): Promise<PageRes<DomainRecord>> {
|
||||
const res = await this.access.getDomainList(req)
|
||||
let list = res.domainlist || []
|
||||
list = list.map(item => ({
|
||||
domain: item.domain,
|
||||
id: item.domain,
|
||||
}))
|
||||
return {
|
||||
pageNo: req.pageNo,
|
||||
pageSize: req.pageSize,
|
||||
total: res.total || 0,
|
||||
list,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//实例化这个provider,将其自动注册到系统中
|
||||
|
||||
Reference in New Issue
Block a user