fix: instance remove (#4602)

This commit is contained in:
Livio Spring
2022-10-26 15:06:48 +02:00
committed by GitHub
parent 001636f2b4
commit d721f725fd
89 changed files with 656 additions and 122 deletions

View File

@@ -37,6 +37,11 @@ func DeleteOrgProjectMapping(db *gorm.DB, table, orgID, projectID, instanceID st
return delete(db)
}
func DeleteInstanceOrgProjectMappings(db *gorm.DB, table, instanceID string) error {
delete := repository.PrepareDeleteByKey(table, model.OrgProjectMappingSearchKey(proj_model.OrgProjectMappingSearchKeyInstanceID), instanceID)
return delete(db)
}
func DeleteOrgProjectMappingsByProjectID(db *gorm.DB, table, projectID, instanceID string) error {
delete := repository.PrepareDeleteByKeys(table,
repository.Key{model.OrgProjectMappingSearchKey(proj_model.OrgProjectMappingSearchKeyProjectID), projectID},