aboutsummaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
authorslene <vslene@gmail.com>2014-03-30 13:30:17 +0800
committerslene <vslene@gmail.com>2014-03-30 13:30:17 +0800
commitd6c9e3413a982fd64a74e774d4a2b8157f39f299 (patch)
tree60ec4e94acdb6925c612deb49871f57c75b64584 /web.go
parente2f63d81d3528c191e85fe228a37b5f0d58a405f (diff)
downloadgitea-d6c9e3413a982fd64a74e774d4a2b8157f39f299.tar.gz
gitea-d6c9e3413a982fd64a74e774d4a2b8157f39f299.zip
fix display bare repo
Diffstat (limited to 'web.go')
-rw-r--r--web.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/web.go b/web.go
index 465d7da7aa..6f25271977 100644
--- a/web.go
+++ b/web.go
@@ -136,19 +136,20 @@ func runWeb(*cli.Context) {
r.Get("/issues/:index", repo.ViewIssue)
r.Get("/pulls", repo.Pulls)
r.Get("/branches", repo.Branches)
+ }, ignSignIn, middleware.RepoAssignment(true))
+
+ m.Group("/:username/:reponame", func(r martini.Router) {
r.Get("/src/:branchname", repo.Single)
r.Get("/src/:branchname/**", repo.Single)
r.Get("/raw/:branchname/**", repo.SingleDownload)
r.Get("/commits/:branchname", repo.Commits)
- }, ignSignIn, middleware.RepoAssignment(true))
-
- m.Get("/:username/:reponame/commit/:branchname/**", ignSignIn, middleware.RepoAssignment(true), repo.Diff)
- m.Get("/:username/:reponame/commit/:branchname", ignSignIn, middleware.RepoAssignment(true), repo.Diff)
+ r.Get("/commit/:branchname", repo.Diff)
+ r.Get("/commit/:branchname/**", repo.Diff)
+ }, ignSignIn, middleware.RepoAssignment(true, true))
m.Group("/:username", func(r martini.Router) {
- r.Get("/:reponame", middleware.RepoAssignment(true), repo.Single)
- r.Get("/:reponame", middleware.RepoAssignment(true), repo.Single)
r.Any("/:reponame/**", repo.Http)
+ r.Get("/:reponame", middleware.RepoAssignment(true, true, true), repo.Single)
}, ignSignIn)
// Not found handler.