Query DNS records by Id

This commit is contained in:
IshaVenikar 2025-01-30 18:37:40 +05:30
parent 63223a4807
commit 85b4265fbe
2 changed files with 4 additions and 12 deletions

View File

@ -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: {

View File

@ -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,