diff options
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cmd/web.go b/cmd/web.go index 641e331b4f..5bde337967 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -198,13 +198,9 @@ func runWeb(ctx *cli.Context) { // Routers. m.Get("/", ignSignIn, routers.Home) 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) - m.Group("", func() { - m.Get("/pulls", user.Pulls) - m.Get("/issues", user.Issues) - }, reqSignIn) + m.Get("/:type(issues|pulls)", reqSignIn, user.Issues) // ***** START: API ***** // FIXME: custom form error response. @@ -387,7 +383,7 @@ func runWeb(ctx *cli.Context) { m.Group("/:org", func() { m.Get("/dashboard", user.Dashboard) - m.Get("/issues", user.Issues) + m.Get("/:type(issues|pulls)", user.Issues) m.Get("/members", org.Members) m.Get("/members/action/:action", org.MembersAction) @@ -520,14 +516,12 @@ func runWeb(ctx *cli.Context) { m.Group("/:username/:reponame", func() { m.Get("/releases", middleware.RepoRef(), repo.Releases) - m.Get("/issues", repo.RetrieveLabels, repo.Issues) + m.Get("/:type(issues|pulls)", repo.RetrieveLabels, repo.Issues) m.Get("/:type(issues|pulls)/:index", repo.ViewIssue) m.Get("/labels/", repo.RetrieveLabels, repo.Labels) m.Get("/milestones", repo.Milestones) - m.Get("/pulls", repo.Pulls) m.Get("/branches", repo.Branches) m.Get("/archive/*", repo.Download) - m.Get("/pulls2/", repo.PullRequest2) m.Group("/pulls/:index", func() { m.Get("/commits", repo.ViewPullCommits) |