diff options
author | slene <vslene@gmail.com> | 2014-03-30 13:30:17 +0800 |
---|---|---|
committer | slene <vslene@gmail.com> | 2014-03-30 13:30:17 +0800 |
commit | d6c9e3413a982fd64a74e774d4a2b8157f39f299 (patch) | |
tree | 60ec4e94acdb6925c612deb49871f57c75b64584 /web.go | |
parent | e2f63d81d3528c191e85fe228a37b5f0d58a405f (diff) | |
download | gitea-d6c9e3413a982fd64a74e774d4a2b8157f39f299.tar.gz gitea-d6c9e3413a982fd64a74e774d4a2b8157f39f299.zip |
fix display bare repo
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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. |