diff options
author | cel 🌸 <cel@blos.sm> | 2024-02-19 23:49:34 +0000 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2024-02-19 23:49:34 +0000 |
commit | ac0983a89692534daa3d36dba528461b5bb32dbc (patch) | |
tree | cc1ced6b3098192f9009cc4f1337da7014b49bd0 /routes/handler.go | |
parent | 3c1b8007b6d5992e6bffc701ad06e0adec717145 (diff) | |
download | legit-ac0983a89692534daa3d36dba528461b5bb32dbc.tar.gz legit-ac0983a89692534daa3d36dba528461b5bb32dbc.tar.bz2 legit-ac0983a89692534daa3d36dba528461b5bb32dbc.zip |
support categories
Diffstat (limited to 'routes/handler.go')
-rw-r--r-- | routes/handler.go | 7 |
1 files changed, 7 insertions, 0 deletions
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") |