From f4ff8fe6eb20ab5b557d7beac095959890e126e8 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Tue, 20 Feb 2024 00:24:38 +0000 Subject: fix routes --- routes/handler.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'routes/handler.go') diff --git a/routes/handler.go b/routes/handler.go index f133e80..1a9bfbd 100644 --- a/routes/handler.go +++ b/routes/handler.go @@ -40,18 +40,18 @@ 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("/:category/:name/tree/:ref/...", d.RepoTree, "GET") mux.HandleFunc("/:name/tree/:ref/...", d.RepoTree, "GET") + mux.HandleFunc("/:category/:name/blob/:ref/...", d.FileContent, "GET") mux.HandleFunc("/:name/blob/:ref/...", d.FileContent, "GET") + mux.HandleFunc("/:category/:name/log/:ref", d.Log, "GET") mux.HandleFunc("/:name/log/:ref", d.Log, "GET") + mux.HandleFunc("/:category/:name/commit/:ref", d.Diff, "GET") mux.HandleFunc("/:name/commit/:ref", d.Diff, "GET") + mux.HandleFunc("/:category/:name/refs", d.Refs, "GET") mux.HandleFunc("/:name/refs", d.Refs, "GET") + mux.HandleFunc("/:category/:name/...", d.Multiplex, "GET", "POST") mux.HandleFunc("/:name/...", d.Multiplex, "GET", "POST") return mux -- cgit