From 28fda643266f62b10b823ed71828f640f17a7db5 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 12 Feb 2014 12:22:56 -0700 Subject: [PATCH] workaround for #51 --- cmd/droned/drone.go | 3 +-- pkg/handler/repos.go | 2 +- pkg/template/pages/repo_dashboard.html | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/droned/drone.go b/cmd/droned/drone.go index b344edad5..86b6ba13f 100644 --- a/cmd/droned/drone.go +++ b/cmd/droned/drone.go @@ -145,8 +145,7 @@ 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", handler.RepoHandler(handler.RepoDashboard)) - m.Get("/:host/:owner/:name/tree/:branch/", handler.RepoHandler(handler.RepoDashboard)) + m.Get("/:host/:owner/:name/tree", 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/repos.go b/pkg/handler/repos.go index 7c4c87acf..65f490732 100644 --- a/pkg/handler/repos.go +++ b/pkg/handler/repos.go @@ -15,7 +15,7 @@ import ( // Display a Repository dashboard. func RepoDashboard(w http.ResponseWriter, r *http.Request, u *User, repo *Repo) error { - branch := r.FormValue(":branch") + branch := r.FormValue("branch") // get a list of all branches branches, err := database.ListBranches(repo.ID) diff --git a/pkg/template/pages/repo_dashboard.html b/pkg/template/pages/repo_dashboard.html index 8c2b6f000..df3a9ce6a 100644 --- a/pkg/template/pages/repo_dashboard.html +++ b/pkg/template/pages/repo_dashboard.html @@ -49,7 +49,7 @@