Refactor providers data
This commit is contained in:
@ -9,7 +9,6 @@ import (
|
||||
"github.com/joho/godotenv"
|
||||
|
||||
"git.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/kube"
|
||||
proto "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/environments"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
@ -28,7 +27,7 @@ type Environemnt struct {
|
||||
type EnvironemntData struct {
|
||||
Name string
|
||||
Description string
|
||||
Provider proto.Provider
|
||||
Provider string
|
||||
Kubernetes string
|
||||
Location string
|
||||
ServerType string
|
||||
@ -58,7 +57,7 @@ func (env *Environemnt) isNsVerified(ctx context.Context) error {
|
||||
|
||||
val, ok := ns.GetLabels()["email-verified"]
|
||||
if !ok || val == "false" {
|
||||
return errors.New("User email is not verified, can't create an new env")
|
||||
return errors.New("user email is not verified, can't create an new env")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user