fix URL match

tokarchuk/v1.17
Unknwon 9 years ago
parent 42a38dfca3
commit e787e73e2f
  1. 8
      cmd/web.go

@ -192,7 +192,7 @@ func runWeb(ctx *cli.Context) {
m.Get("/explore", ignSignIn, routers.Explore) m.Get("/explore", ignSignIn, routers.Explore)
m.Combo("/install", routers.InstallInit).Get(routers.Install). m.Combo("/install", routers.InstallInit).Get(routers.Install).
Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost) Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost)
m.Get("/:type(issues|pulls)", reqSignIn, user.Issues) m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
// ***** START: API ***** // ***** START: API *****
// FIXME: custom form error response. // FIXME: custom form error response.
@ -375,7 +375,7 @@ func runWeb(ctx *cli.Context) {
m.Group("/:org", func() { m.Group("/:org", func() {
m.Get("/dashboard", user.Dashboard) m.Get("/dashboard", user.Dashboard)
m.Get("/:type(issues|pulls)", user.Issues) m.Get("/^:type(issues|pulls)$", user.Issues)
m.Get("/members", org.Members) m.Get("/members", org.Members)
m.Get("/members/action/:action", org.MembersAction) m.Get("/members/action/:action", org.MembersAction)
@ -509,8 +509,8 @@ func runWeb(ctx *cli.Context) {
m.Group("/:username/:reponame", func() { m.Group("/:username/:reponame", func() {
m.Get("/releases", middleware.RepoRef(), repo.Releases) m.Get("/releases", middleware.RepoRef(), repo.Releases)
m.Get("/:type(issues|pulls)", repo.RetrieveLabels, repo.Issues) m.Get("/^:type(issues|pulls)$", repo.RetrieveLabels, repo.Issues)
m.Get("/:type(issues|pulls)/:index", repo.ViewIssue) m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue)
m.Get("/labels/", repo.RetrieveLabels, repo.Labels) m.Get("/labels/", repo.RetrieveLabels, repo.Labels)
m.Get("/milestones", repo.Milestones) m.Get("/milestones", repo.Milestones)
m.Get("/branches", repo.Branches) m.Get("/branches", repo.Branches)

Loading…
Cancel
Save