ui/fix: Insane amount

This commit is contained in:
Andras Bacsai
2022-04-08 10:35:16 +02:00
parent 76754ded79
commit 0d0715a340
22 changed files with 509 additions and 490 deletions

View File

@@ -73,7 +73,11 @@ export async function removeApplication({ id, teamId }) {
await prisma.build.deleteMany({ where: { applicationId: id } });
await prisma.secret.deleteMany({ where: { applicationId: id } });
await prisma.applicationPersistentStorage.deleteMany({ where: { applicationId: id } });
await prisma.application.deleteMany({ where: { id, teams: { some: { id: teamId } } } });
if (teamId === '0') {
await prisma.application.deleteMany({ where: { id } });
} else {
await prisma.application.deleteMany({ where: { id, teams: { some: { id: teamId } } } });
}
}
export async function getApplicationWebhook({ projectId, branch }) {