Query DNS records by Id
This commit is contained in:
parent
63223a4807
commit
85b4265fbe
@ -444,16 +444,10 @@ export class Registry {
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch deployment DNS Records by filter
|
||||
* Fetch deployment DNS Records by Id
|
||||
*/
|
||||
async getDNSRecordsByFilter(filter: { [key: string]: any }): Promise<DNSRecord[]> {
|
||||
return this.registry.queryRecords(
|
||||
{
|
||||
type: DNS_RECORD_TYPE,
|
||||
...filter
|
||||
},
|
||||
true
|
||||
);
|
||||
async getDNSRecordsById(id: string): Promise<DNSRecord[]> {
|
||||
return this.registry.getRecordsByIds([id]);
|
||||
}
|
||||
|
||||
async createApplicationDeploymentRemovalRequest(data: {
|
||||
|
@ -201,9 +201,7 @@ export class Service {
|
||||
log(`Project ${deployment.projectId} not found`);
|
||||
return;
|
||||
} else {
|
||||
const dnsRecords = await this.laconicRegistry.getDNSRecordsByFilter({
|
||||
request: deployment.applicationDeploymentRequestId
|
||||
})
|
||||
const dnsRecords = await this.laconicRegistry.getDNSRecordsById(record.attributes.dns);
|
||||
|
||||
const dnsRecordData: DNSRecordAttributes = {
|
||||
name: dnsRecords[0].attributes.name,
|
||||
|
Loading…
Reference in New Issue
Block a user