fix: env decryption + remove log

This commit is contained in:
Lakhan Samani 2022-03-07 15:35:33 +05:30
parent 4b25e8941c
commit 1d61840c6d

View File

@ -2,7 +2,6 @@ package env
import (
"encoding/json"
"fmt"
"log"
"os"
"strconv"
@ -35,7 +34,12 @@ func GetEnvData() (envstore.Store, error) {
envstore.EnvStoreObj.UpdateEnvVariable(constants.StringStoreIdentifier, constants.EnvKeyEncryptionKey, decryptedEncryptionKey)
decryptedConfigs, err := crypto.DecryptAESEnv([]byte(env.EnvData))
b64DecryptedConfig, err := crypto.DecryptB64(env.EnvData)
if err != nil {
return result, err
}
decryptedConfigs, err := crypto.DecryptAESEnv([]byte(b64DecryptedConfig))
if err != nil {
return result, err
}
@ -81,8 +85,6 @@ func PersistEnv() error {
return err
}
fmt.Println("decryptedEncryptionKey:", decryptedEncryptionKey)
envstore.EnvStoreObj.UpdateEnvVariable(constants.StringStoreIdentifier, constants.EnvKeyEncryptionKey, decryptedEncryptionKey)
b64DecryptedConfig, err := crypto.DecryptB64(env.EnvData)