From ac0983a89692534daa3d36dba528461b5bb32dbc Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Mon, 19 Feb 2024 23:49:34 +0000 Subject: support categories --- routes/handler.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'routes/handler.go') diff --git a/routes/handler.go b/routes/handler.go index a0e7832..f133e80 100644 --- a/routes/handler.go +++ b/routes/handler.go @@ -39,6 +39,13 @@ func Handlers(c *config.Config) *flow.Mux { mux.HandleFunc("/", d.Index, "GET") mux.HandleFunc("/static/:file", d.ServeStatic, "GET") + mux.HandleFunc("/:category/:name", d.Multiplex, "GET", "POST") + mux.HandleFunc("/:category/:name/tree/:ref/...", d.RepoTree, "GET") + mux.HandleFunc("/:category/:name/blob/:ref/...", d.FileContent, "GET") + mux.HandleFunc("/:category/:name/log/:ref", d.Log, "GET") + mux.HandleFunc("/:category/:name/commit/:ref", d.Diff, "GET") + mux.HandleFunc("/:category/:name/refs", d.Refs, "GET") + mux.HandleFunc("/:category/:name/...", d.Multiplex, "GET", "POST") mux.HandleFunc("/:name", d.Multiplex, "GET", "POST") mux.HandleFunc("/:name/tree/:ref/...", d.RepoTree, "GET") mux.HandleFunc("/:name/blob/:ref/...", d.FileContent, "GET") -- cgit