fix: Remove build logs in case of app removed

This commit is contained in:
Andras Bacsai 2022-03-19 15:06:25 +01:00
parent 547ca60c2a
commit 35384deb68

View File

@ -64,6 +64,7 @@ export async function removeApplication({ id, teamId }) {
await prisma.applicationSettings.deleteMany({ where: { application: { id } } });
await prisma.buildLog.deleteMany({ where: { applicationId: id } });
await prisma.build.deleteMany({ where: { applicationId: id } });
await prisma.secret.deleteMany({ where: { applicationId: id } });
await prisma.application.deleteMany({ where: { id, teams: { some: { id: teamId } } } });
}