Преглед изворни кода

update overwrite method to read from db on return

Alexander Belanger пре 4 година
родитељ
комит
801f61a2fc
1 измењених фајлова са 2 додато и 7 уклоњено
  1. 2 7
      internal/repository/gorm/auth.go

+ 2 - 7
internal/repository/gorm/auth.go

@@ -1419,13 +1419,8 @@ func (repo *AzureIntegrationRepository) OverwriteAzureIntegration(
 		}
 	}
 
-	err = repo.DecryptAzureIntegrationData(az, repo.key)
-
-	if err != nil {
-		return nil, err
-	}
-
-	return az, nil
+	// perform another read
+	return repo.ReadAzureIntegration(az.ProjectID, az.ID)
 }
 
 // ReadAzureIntegration finds a Azure auth mechanism by id