Get DNS records for all completed deployments

This commit is contained in:
Shreerang Kale 2025-01-30 18:35:57 +05:30
parent dd12369cb2
commit 6d2b341d48
2 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,7 @@ import { DatabaseConfig } from './config';
import { User } from './entity/User';
import { Organization } from './entity/Organization';
import { Project } from './entity/Project';
import { Deployment } from './entity/Deployment';
import { Deployment, DeploymentStatus } from './entity/Deployment';
import { ProjectMember } from './entity/ProjectMember';
import { EnvironmentVariable } from './entity/EnvironmentVariable';
import { Domain } from './entity/Domain';
@ -630,8 +630,9 @@ export class Database {
const deployment = await deploymentRepository.findOne({
where: {
project: {
id: projectId
id: projectId,
},
status: DeploymentStatus.Ready
}, order: {
createdAt: "DESC",
},

View File

@ -76,11 +76,11 @@ const Config = () => {
const dnsData = await client.getLatestDNSDataByProjectId(id);
setIPAddress(dnsData.value);
if (!dnsData || !dnsData.value) {
setIPAddress("Not Configured")
}
setIPAddress(dnsData.value);
};
fetchDNSData();