Return the created env on create req

This commit is contained in:
Nikolai Rodionov 2024-04-30 10:30:21 +02:00
parent c49e885255
commit e6e59badf9
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD

View File

@ -204,19 +204,29 @@ func (env *Environemnt) Get(ctx context.Context) error {
} }
if val, ok := res["SP_DESCRIPTION"]; ok { if val, ok := res["SP_DESCRIPTION"]; ok {
env.Data.Description = val env.Data.Description = val
} else {
env.Data.Description = ""
} }
if val, ok := res["SP_PROVIDER"]; ok { if val, ok := res["SP_PROVIDER"]; ok {
env.Data.Provider = val env.Data.Provider = val
} else {
env.Data.Provider = ""
} }
if val, ok := res["SP_KUBERNETES"]; ok { if val, ok := res["SP_KUBERNETES"]; ok {
env.Data.Kubernetes = val env.Data.Kubernetes = val
} else {
env.Data.Kubernetes = ""
} }
if val, ok := res["SP_SERVER_TYPE"]; ok { if val, ok := res["SP_SERVER_TYPE"]; ok {
env.Data.ServerType = val env.Data.ServerType = val
} else {
env.Data.ServerType = ""
} }
if val, ok := res["SP_SERVER_LOCATION"]; ok { if val, ok := res["SP_SERVER_LOCATION"]; ok {
env.Data.Location = val env.Data.Location = val
} else {
env.Data.Location = ""
} }
return nil return nil