1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Delete project team when project gets deleted

This commit is contained in:
Eldad Fux 2020-06-08 21:33:37 +03:00
parent 2de86d2cb7
commit 6f814746b4

View file

@ -424,6 +424,10 @@ $utopia->delete('/v1/projects/:projectId')
}
}
}
if (!$consoleDB->deleteDocument($project->getAttribute('teamId', null))) {
throw new Exception('Failed to remove project team from DB', 500);
}
if (!$consoleDB->deleteDocument($projectId)) {
throw new Exception('Failed to remove project from DB', 500);