summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-14 21:19:34 +0530
committerLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-14 21:19:34 +0530
commitabe300762f2f01cddeabad1bc98b0dfee599a5e8 (patch)
treeb779962faedbd108f58954b1b9eebee178e98d33
parent1b27f32cc21c4f85e475795c1033f4ad2d6cba52 (diff)
downloadlegit-abe300762f2f01cddeabad1bc98b0dfee599a5e8.tar.gz
legit-abe300762f2f01cddeabad1bc98b0dfee599a5e8.tar.bz2
legit-abe300762f2f01cddeabad1bc98b0dfee599a5e8.zip
routes: wildcard multiplex route at the end
-rw-r--r--routes/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/handler.go b/routes/handler.go
index 83f893f..3a63d3d 100644
--- a/routes/handler.go
+++ b/routes/handler.go
@@ -30,7 +30,7 @@ func (dw *depsWrapper) Multiplex(w http.ResponseWriter, r *http.Request) {
dw.gitsvc.ServeHTTP(w, r)
} else if r.Method == "GET" {
log.Println("index:", r.URL.String())
- dw.actualDeps.Index(w, r)
+ dw.actualDeps.RepoIndex(w, r)
}
}
@@ -54,12 +54,12 @@ func Handlers(c *config.Config) *flow.Mux {
mux.HandleFunc("/", d.Index, "GET")
mux.HandleFunc("/:name", dw.Multiplex, "GET", "POST")
- mux.HandleFunc("/:name/...", dw.Multiplex, "GET", "POST")
mux.HandleFunc("/:name/tree/:ref/...", d.RepoTree, "GET")
mux.HandleFunc("/:name/blob/:ref/...", d.FileContent, "GET")
mux.HandleFunc("/:name/log/:ref", d.Log, "GET")
mux.HandleFunc("/:name/commit/:ref", d.Diff, "GET")
mux.HandleFunc("/:name/refs", d.Refs, "GET")
+ mux.HandleFunc("/:name/...", dw.Multiplex, "GET", "POST")
return mux
}