Update method to return single DNS record by ID
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m38s

This commit is contained in:
IshaVenikar 2025-01-31 18:18:25 +05:30
parent 00b0cec964
commit 605124e785
2 changed files with 8 additions and 8 deletions

View File

@ -431,9 +431,9 @@ export class Registry {
}
/**
* Fetch record by Id
* Fetch deployment DNS record by Id
*/
async getRecordById(id: string): Promise<DNSRecord[]> {
async getDNSRecordById(id: string): Promise<DNSRecord> {
return this.registry.getRecordsByIds([id]);
}

View File

@ -201,14 +201,14 @@ export class Service {
log(`Project ${deployment.projectId} not found`);
return;
} else {
const dnsRecords = await this.laconicRegistry.getRecordById(record.attributes.dns);
const dnsRecord = await this.laconicRegistry.getDNSRecordById(record.attributes.dns);
const dnsRecordData: DNSRecordAttributes = {
name: dnsRecords[0].attributes.name,
request: dnsRecords[0].attributes.request,
resourceType: dnsRecords[0].attributes.resourceType,
value: dnsRecords[0].attributes.value,
version: dnsRecords[0].attributes.version,
name: dnsRecord.attributes.name,
request: dnsRecord.attributes.request,
resourceType: dnsRecord.attributes.resourceType,
value: dnsRecord.attributes.value,
version: dnsRecord.attributes.version,
}
deployment.applicationDeploymentRecordId = record.id;