fix: delete apps with previews

This commit is contained in:
Andras Bacsai
2023-01-16 10:16:49 +01:00
parent 2fd001f6d2
commit 9c8f6e9195
2 changed files with 4 additions and 0 deletions

View File

@@ -746,6 +746,7 @@ export async function deleteApplication(
await prisma.secret.deleteMany({ where: { applicationId: id } });
await prisma.applicationPersistentStorage.deleteMany({ where: { applicationId: id } });
await prisma.applicationConnectedDatabase.deleteMany({ where: { applicationId: id } });
await prisma.previewApplication.deleteMany({ where: { applicationId: id } });
if (teamId === '0') {
await prisma.application.deleteMany({ where: { id } });
} else {