Update method to return single DNS record by ID
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m38s
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m38s
This commit is contained in:
parent
00b0cec964
commit
605124e785
@ -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]);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user