diff --git a/cmd/droned/drone.go b/cmd/droned/drone.go index 6397d134..b344edad 100644 --- a/cmd/droned/drone.go +++ b/cmd/droned/drone.go @@ -145,8 +145,8 @@ func setupHandlers() { m.Get("/:host/:owner/:name/commit/:commit/build/:label/out.txt", handler.RepoHandler(handler.BuildOut)) m.Get("/:host/:owner/:name/commit/:commit/build/:label", handler.RepoHandler(handler.CommitShow)) m.Get("/:host/:owner/:name/commit/:commit", handler.RepoHandler(handler.CommitShow)) - m.Get("/:host/:owner/:name/tree/:branch/status.png", handler.ErrorHandler(handler.Badge)) m.Get("/:host/:owner/:name/tree/:branch", handler.RepoHandler(handler.RepoDashboard)) + m.Get("/:host/:owner/:name/tree/:branch/", handler.RepoHandler(handler.RepoDashboard)) m.Get("/:host/:owner/:name/status.png", handler.ErrorHandler(handler.Badge)) m.Get("/:host/:owner/:name/settings", handler.RepoAdminHandler(handler.RepoSettingsForm)) m.Get("/:host/:owner/:name/params", handler.RepoAdminHandler(handler.RepoParamsForm)) diff --git a/pkg/handler/badges.go b/pkg/handler/badges.go index bfe13e61..20415115 100644 --- a/pkg/handler/badges.go +++ b/pkg/handler/badges.go @@ -11,7 +11,7 @@ import ( // repository and an optional branch. // TODO this needs to implement basic caching func Badge(w http.ResponseWriter, r *http.Request) error { - branchParam := r.FormValue(":branch") + branchParam := r.FormValue("branch") hostParam := r.FormValue(":host") ownerParam := r.FormValue(":owner") nameParam := r.FormValue(":name")