Update method name to get record by Id
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m40s

This commit is contained in:
IshaVenikar 2025-02-03 09:17:45 +05:30
parent f318a95641
commit a17386eb68
2 changed files with 51 additions and 50 deletions

View File

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

View File

@ -22,6 +22,7 @@ import {
AppDeploymentRemovalRecord,
AuctionParams,
DeployerRecord,
DNSRecord,
DNSRecordAttributes,
EnvironmentVariables,
GitPushEventPayload,
@ -200,8 +201,9 @@ export class Service {
if (!deployment.project) {
log(`Project ${deployment.projectId} not found`);
return;
} else {
const dnsRecord = (await this.laconicRegistry.getDNSRecordById(record.attributes.dns))[0];
}
const dnsRecord: DNSRecord = (await this.laconicRegistry.getRecordById(record.attributes.dns))[0];
const dnsRecordData: DNSRecordAttributes = {
name: dnsRecord.attributes.name,
@ -254,7 +256,6 @@ export class Service {
log(
`Updated deployment ${deployment.id} with URL ${record.attributes.url}`,
);
}
});
await Promise.all(deploymentUpdatePromises);