X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/231a86fd3f7e30e9f66d71d92ad7c26578637e37..ef25437d74cd7c2ce9ba4df2364c1da3d06b8bbb:/lib/controller/handler.go?ds=sidebyside diff --git a/lib/controller/handler.go b/lib/controller/handler.go index d524195e44..f7b2362f37 100644 --- a/lib/controller/handler.go +++ b/lib/controller/handler.go @@ -5,19 +5,17 @@ package controller import ( - "bytes" "context" "database/sql" "errors" "fmt" - "io" "net/http" "net/url" "strings" "sync" "time" - "git.curoverse.com/arvados.git/lib/config" + "git.curoverse.com/arvados.git/lib/controller/federation" "git.curoverse.com/arvados.git/lib/controller/railsproxy" "git.curoverse.com/arvados.git/lib/controller/router" "git.curoverse.com/arvados.git/sdk/go/arvados" @@ -79,19 +77,10 @@ func (h *Handler) setup() { Routes: health.Routes{"ping": func() error { _, err := h.db(&http.Request{}); return err }}, }) - mux.Handle("/arvados/v1/config", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - var buf bytes.Buffer - err := config.ExportJSON(&buf, h.Cluster) - if err != nil { - httpserver.Error(w, err.Error(), http.StatusInternalServerError) - return - } - w.Header().Set("Content-Type", "application/json") - io.Copy(w, &buf) - })) + rtr := router.New(federation.New(h.Cluster)) + mux.Handle("/arvados/v1/config", rtr) if h.Cluster.EnableBetaController14287 { - rtr := router.New(h.Cluster) mux.Handle("/arvados/v1/collections", rtr) mux.Handle("/arvados/v1/collections/", rtr) }