diff --git a/packages/backend/src/registry.ts b/packages/backend/src/registry.ts index 213c65aa..961d0003 100644 --- a/packages/backend/src/registry.ts +++ b/packages/backend/src/registry.ts @@ -16,7 +16,7 @@ import { ApplicationDeploymentRequest, ApplicationDeploymentRemovalRequest } from './entity/Deployment'; -import { AppDeploymentRecord, AppDeploymentRemovalRecord, AuctionParams, DeployerRecord, DNSRecord, DNSRecordAttributes } from './types'; +import { AppDeploymentRecord, AppDeploymentRemovalRecord, AuctionParams, DeployerRecord, DNSRecord } from './types'; import { getConfig, getRepoDetails, registryTransactionWithRetry, sleep } from './utils'; const log = debug('snowball:registry'); @@ -442,9 +442,9 @@ export class Registry { } /** - * Fetch deployment DNS record by Id + * Fetch record by Id */ - async getDNSRecordById(id: string): Promise { + async getRecordById(id: string): Promise { return this.registry.getRecordsByIds([id]); } diff --git a/packages/backend/src/service.ts b/packages/backend/src/service.ts index d7804bad..5701c1f8 100644 --- a/packages/backend/src/service.ts +++ b/packages/backend/src/service.ts @@ -201,7 +201,7 @@ export class Service { log(`Project ${deployment.projectId} not found`); return; } else { - const dnsRecords = await this.laconicRegistry.getDNSRecordById(record.attributes.dns); + const dnsRecords = await this.laconicRegistry.getRecordById(record.attributes.dns); const dnsRecordData: DNSRecordAttributes = { name: dnsRecords[0].attributes.name, @@ -273,7 +273,7 @@ export class Service { projectDeployment.deployer.deployerLrn === deployment.deployer.deployerLrn && projectDeployment.id !== deployment.id && - !deployment.isDNS, + !projectDeployment.isDNS, ); for (const oldDeployment of oldDeployments) { await this.db.updateDeployment(