feat: submit delete deployment request

doesn't appear to work when the deployment is current?
This commit is contained in:
Eric Lewis
2024-04-25 16:57:14 +05:30
committed by nabarun
parent 8210512eea
commit 328da7fdc8
2 changed files with 33 additions and 2 deletions
+10 -2
View File
@@ -720,8 +720,16 @@ export class Service {
}
async deleteDeployment (deploymentId: string): Promise<boolean> {
const result = await this.registry.createApplicationDeploymentRemovalRequest({ deploymentId });
return (result !== undefined || result !== null);
const deployment = await this.db.getDeployment({
where: {
id: deploymentId
}
});
if (deployment && deployment.applicationDeploymentRecordId) {
const result = await this.registry.createApplicationDeploymentRemovalRequest({ deploymentId: deployment.applicationDeploymentRecordId });
return (result !== undefined || result !== null);
}
return false;
}
async addDomain (