Rename method for getting commit deployments by Id
All checks were successful
Lint / lint (20.x) (pull_request) Successful in 4m36s

This commit is contained in:
IshaVenikar 2025-02-03 11:15:19 +05:30
parent 32001b3d5a
commit c685b7d5b1
2 changed files with 17 additions and 19 deletions

View File

@ -38,7 +38,7 @@ export const createResolvers = async (service: Service): Promise<any> => {
},
deployments: async (_: any, { projectId }: { projectId: string }) => {
return service.getDeploymentsByProjectId(projectId);
return service.getCommitDeploymentsByProjectId(projectId);
},
environmentVariables: async (

View File

@ -237,10 +237,7 @@ export class Service {
}
});
if (!oldDNSDeployment) {
return;
}
if (oldDNSDeployment) {
// Delete previous DNS deployment
await this.db.deleteDeploymentById(oldDNSDeployment.id);
@ -254,6 +251,7 @@ export class Service {
await this.db.updateDeploymentById(deployment.id, { domain });
}
}
}
await this.db.updateDeploymentById(deployment.id, deployment);
@ -483,14 +481,14 @@ export class Service {
return dbProjects;
}
async getDeploymentsByProjectId(projectId: string): Promise<Deployment[]> {
const dbDeployments = await this.db.getCommitDeploymentsByProjectId(projectId);
return dbDeployments;
async getCommitDeploymentsByProjectId(projectId: string): Promise<Deployment[]> {
const commitDeployments = await this.db.getCommitDeploymentsByProjectId(projectId);
return commitDeployments;
}
async getLatestDNSDataByProjectId(projectId: string): Promise<DNSRecordAttributes | null> {
const dbDeployments = await this.db.getLatestDNSDataByProjectId(projectId);
return dbDeployments;
const dnsDeployments = await this.db.getLatestDNSDataByProjectId(projectId);
return dnsDeployments;
}
async getEnvironmentVariablesByProjectId(