aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-09-02 16:18:09 -0400
committerUnknwon <u@gogs.io>2015-09-02 16:18:09 -0400
commit83dc2468f574e9cf83515e54268bdb4c03f6d98c (patch)
tree03499c31d850c1c0e4cb063b9cc70f9c1d2a063b /cmd
parent842770d7fbc72789d6df885da7ec5a2d4070f25f (diff)
downloadgitea-83dc2468f574e9cf83515e54268bdb4c03f6d98c.tar.gz
gitea-83dc2468f574e9cf83515e54268bdb4c03f6d98c.zip
finish initial version of pull request
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go14
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)