Remove the default org (#270)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-08-17 15:38:41 -04:00
1 parent 01059e6ca8
commit 282177afc2
24 files changed
+190 -431

No files matched your search

+1 -13
View File
@@ -21,18 +21,6 @@ func handleUiWithAssets(c *Controller) http.Handler {
nextHandler = http.FileServer(ui.AssetFile())
}
rootHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
case "/":
irw := newIndexResponseWriter(c.conf.DefaultOrgId)
nextHandler.ServeHTTP(irw, r)
irw.writeToWriter(w)
default:
nextHandler.ServeHTTP(w, r)
}
})
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodGet {
w.WriteHeader(http.StatusMethodNotAllowed)
@@ -66,6 +54,6 @@ func handleUiWithAssets(c *Controller) http.Handler {
}
// Fall through to the next handler
rootHandler.ServeHTTP(w, r)
nextHandler.ServeHTTP(w, r)
})
}