summaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
authorslene <vslene@gmail.com>2014-03-30 10:06:53 +0800
committerslene <vslene@gmail.com>2014-03-30 10:06:53 +0800
commite60676aec607471ebfff3a463a7cd7050d645672 (patch)
treea490177b7e89ae12d928d8bb34f838a78626914d /web.go
parent66b697a51345bfed8cc472cb894a6edc7845397f (diff)
downloadgitea-e60676aec607471ebfff3a463a7cd7050d645672.tar.gz
gitea-e60676aec607471ebfff3a463a7cd7050d645672.zip
remove repeat routers & change commitd to branchname
Diffstat (limited to 'web.go')
-rw-r--r--web.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/web.go b/web.go
index 6aabc0e909..465d7da7aa 100644
--- a/web.go
+++ b/web.go
@@ -130,8 +130,8 @@ func runWeb(*cli.Context) {
r.Post("/issues/:index", binding.BindIgnErr(auth.CreateIssueForm{}), repo.UpdateIssue)
r.Post("/comment/:action", repo.Comment)
}, reqSignIn, middleware.RepoAssignment(true))
+
m.Group("/:username/:reponame", func(r martini.Router) {
- r.Get("/commits/:branchname", repo.Commits)
r.Get("/issues", repo.Issues)
r.Get("/issues/:index", repo.ViewIssue)
r.Get("/pulls", repo.Pulls)
@@ -140,11 +140,10 @@ func runWeb(*cli.Context) {
r.Get("/src/:branchname/**", repo.Single)
r.Get("/raw/:branchname/**", repo.SingleDownload)
r.Get("/commits/:branchname", repo.Commits)
- r.Get("/commits/:branchname", repo.Commits)
}, ignSignIn, middleware.RepoAssignment(true))
- m.Get("/:username/:reponame/commit/:commitid/**", ignSignIn, middleware.RepoAssignment(true), repo.Diff)
- m.Get("/:username/:reponame/commit/:commitid", ignSignIn, middleware.RepoAssignment(true), repo.Diff)
+ m.Get("/:username/:reponame/commit/:branchname/**", ignSignIn, middleware.RepoAssignment(true), repo.Diff)
+ m.Get("/:username/:reponame/commit/:branchname", ignSignIn, middleware.RepoAssignment(true), repo.Diff)
m.Group("/:username", func(r martini.Router) {
r.Get("/:reponame", middleware.RepoAssignment(true), repo.Single)