fix issues

This commit is contained in:
Ybehrooz
2025-08-30 20:08:19 +03:30
parent 36a36a232f
commit 06b7aaa548
3 changed files with 4 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ func CreateClusterHandler(w http.ResponseWriter, r *http.Request) {
// vclusterCollection := db.Vclusters_details.FindOne(context.TODO(), bson.M{"name": Cluster.Name}).Decode(&existsCluster)
if cluster.Name == "" || cluster.ControlPlane == "" || cluster.PlatformVersion == "" || cluster.Cpu == "" || cluster.Memory == "" {
if strings.ToLower(cluster.Name) == "" || cluster.ControlPlane == "" || cluster.PlatformVersion == "" || cluster.Cpu == "" || cluster.Memory == "" {
http.Error(w, "Invalid input", http.StatusBadRequest)
return
}