aboutsummaryrefslogtreecommitdiff
path: root/pkg/handler/router.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2024-06-01 19:59:43 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2024-06-01 19:59:43 +0200
commite3705f35c642e578625ce4574d189fa0b0869403 (patch)
treef63d779d4eb817ad6b5abed30f50ad3b85ffcab1 /pkg/handler/router.go
parentf1643ffcbd543cacfe9ab5e46eafdd0c39cd47fd (diff)
downloadcerrado-e3705f35c642e578625ce4574d189fa0b0869403.tar.gz
cerrado-e3705f35c642e578625ce4574d189fa0b0869403.tar.bz2
cerrado-e3705f35c642e578625ce4574d189fa0b0869403.zip
feat: Add ref support
Now log and tree can be loaded using a given reference.
Diffstat (limited to 'pkg/handler/router.go')
-rw-r--r--pkg/handler/router.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/handler/router.go b/pkg/handler/router.go
index f73e9fb..79f70f1 100644
--- a/pkg/handler/router.go
+++ b/pkg/handler/router.go
@@ -34,10 +34,10 @@ func MountHandler(
mux.PathPrefix("/static").Handler(staticHandler)
mux.HandleFunc("/{name}/about", gitHandler.About)
- mux.HandleFunc("/{name}/summary", gitHandler.Summary)
+ mux.HandleFunc("/{name}", gitHandler.Summary)
mux.HandleFunc("/{name}/refs", gitHandler.Refs)
- mux.HandleFunc("/{name}/tree", gitHandler.Tree)
- mux.HandleFunc("/{name}/log", gitHandler.Log)
+ mux.HandleFunc("/{name}/tree/{ref}", gitHandler.Tree)
+ mux.HandleFunc("/{name}/log/{ref}", gitHandler.Log)
mux.HandleFunc("/config", configHander)
mux.HandleFunc("/about", aboutHandler.About)
mux.HandleFunc("/", gitHandler.List)