all repos — legit @ abe300762f2f01cddeabad1bc98b0dfee599a5e8

web frontend for git

routes: wildcard multiplex route at the end
Anirudh Oppiliappan x@icyphox.sh
Wed, 14 Dec 2022 21:19:34 +0530
commit

abe300762f2f01cddeabad1bc98b0dfee599a5e8

parent

1b27f32cc21c4f85e475795c1033f4ad2d6cba52

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M routes/handler.goroutes/handler.go

@@ -30,7 +30,7 @@ } else if gitCommand.MatchString(path) && r.Method == "POST" {

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 @@ })

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 }