mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
misc: renamed connection check method
This commit is contained in:
@@ -23,7 +23,7 @@ func WriteToFile(fileName string, dataToWrite []byte, filePerm os.FileMode) erro
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func CheckIsConnectedToInfisicalAPI() (ok bool) {
|
func ValidateInfisicalAPIConnection() (ok bool) {
|
||||||
_, err := http.Get(fmt.Sprintf("%v/status", config.INFISICAL_URL))
|
_, err := http.Get(fmt.Sprintf("%v/status", config.INFISICAL_URL))
|
||||||
return err == nil
|
return err == nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ func GetAllEnvironmentVariables(params models.GetAllSecretsParameters, projectCo
|
|||||||
log.Debug().Msg("GetAllEnvironmentVariables: Trying to fetch secrets using logged in details")
|
log.Debug().Msg("GetAllEnvironmentVariables: Trying to fetch secrets using logged in details")
|
||||||
|
|
||||||
loggedInUserDetails, err := GetCurrentLoggedInUserDetails()
|
loggedInUserDetails, err := GetCurrentLoggedInUserDetails()
|
||||||
isConnected := CheckIsConnectedToInfisicalAPI()
|
isConnected := ValidateInfisicalAPIConnection()
|
||||||
|
|
||||||
if isConnected {
|
if isConnected {
|
||||||
log.Debug().Msg("GetAllEnvironmentVariables: Connected to Infisical instance, checking logged in creds")
|
log.Debug().Msg("GetAllEnvironmentVariables: Connected to Infisical instance, checking logged in creds")
|
||||||
|
|||||||
Reference in New Issue
Block a user