update prompt selections to const

This commit is contained in:
Maidul Islam
2023-04-20 14:08:35 -07:00
parent 5a906d412b
commit f79e1d754d
2 changed files with 2 additions and 3 deletions

View File

@@ -284,7 +284,7 @@ func init() {
}
func DomainOverridePrompt() (bool, error) {
var (
const (
PRESET = "Use Domain"
OVERRIDE = "Change Domain"
)
@@ -306,7 +306,7 @@ func DomainOverridePrompt() (bool, error) {
func askForDomain() error {
//query user to choose between Infisical cloud or self hosting
var (
const (
INFISICAL_CLOUD = "Infisical Cloud"
SELF_HOSTING = "Self Hosting"
)

View File

@@ -39,7 +39,6 @@ func WriteInitalConfig(userCredentials *models.UserCredentials) error {
}
//if empty or if email not in loggedinUsers
if len(existingConfigFile.LoggedInUsers) == 0 || !ConfigContainsEmail(existingConfigFile.LoggedInUsers, userCredentials.Email) {
existingConfigFile.LoggedInUsers = append(existingConfigFile.LoggedInUsers, loggedInUser)
} else {
//if exists update domain of loggedin users