hunk.code_window: 	case strings.HasPrefix(r.URL.Path, "/api/endpoint_groups"):
   		http.StripPrefix("/api", h.EndpointGroupHandler).ServeHTTP(w, r)
   	case strings.HasPrefix(r.URL.Path, "/api/kubernetes"):
   		http.StripPrefix("/api", h.KubernetesHandler).ServeHTTP(w, r)
   	// Helm subpath under kubernetes -> /api/endpoints/{id}/kubernetes/helm
   	case strings.HasPrefix(r.URL.Path, "/api/endpoints/") && strings.Contains(r.URL.Path, "/kubernetes/helm"):
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit: 	case strings.HasPrefix(r.URL.Path, "/api/docker"):
   		http.StripPrefix("/api/docker", h.DockerHandler).ServeHTTP(w, r)
  
hunk.file_path: api/http/handler/handler.go
hunk.type: add
file: package endpoints
  
  import portainer "github.com/portainer/portainer/api"
  
  func (handler *Handler) isNameUnique(name string, endpointID portainer.EndpointID) (bool, error) {
  	endpoints, err := handler.DataStore.Endpoint().Endpoints()
  	if err != nil {
  		return false, err
  	}
  
  	for _, endpoint := range endpoints {
  		if endpoint.Name == name && (endpointID == 0 || endpoint.ID != endpointID) {
  			return false, nil
  		}
  	}
  
  	return true, nil
  }
  