diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-04 23:53:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-04 23:53:46 +0800 |
commit | 8a421b1fd702d99e8438f6ef6f4ee339f1eaa130 (patch) | |
tree | c69e598ca9dca29dc64a4e1d8525165ec794106f /cmd/web.go | |
parent | 49fa03bf4286bd2cbf90b271fb65d4f70e5de57f (diff) | |
download | gitea-8a421b1fd702d99e8438f6ef6f4ee339f1eaa130.tar.gz gitea-8a421b1fd702d99e8438f6ef6f4ee339f1eaa130.zip |
Add units concept for modulable functions of a repository (#742)
* Add units concept for modulable functions of a repository
* remove unused comment codes & fix lints and tests
* remove unused comment codes
* use struct config instead of map
* fix lint
* rm wrong files
* fix tests
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/web.go b/cmd/web.go index 026b938f21..0d18e86313 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -441,7 +441,7 @@ func runWeb(ctx *cli.Context) error { }, func(ctx *context.Context) { ctx.Data["PageIsSettings"] = true - }) + }, context.UnitTypes()) }, reqSignIn, context.RepoAssignment(), reqRepoAdmin, context.RepoRef()) m.Get("/:username/:reponame/action/:action", reqSignIn, context.RepoAssignment(), repo.Action) @@ -535,7 +535,7 @@ func runWeb(ctx *cli.Context) error { return } }) - }, reqSignIn, context.RepoAssignment(), repo.MustBeNotBare) + }, reqSignIn, context.RepoAssignment(), repo.MustBeNotBare, context.UnitTypes()) m.Group("/:username/:reponame", func() { m.Group("", func() { @@ -581,7 +581,7 @@ func runWeb(ctx *cli.Context) error { m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) m.Get("/compare/:before([a-z0-9]{40})\\.\\.\\.:after([a-z0-9]{40})", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.CompareDiff) - }, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare) + }, ignSignIn, context.RepoAssignment(), repo.MustBeNotBare, context.UnitTypes()) m.Group("/:username/:reponame", func() { m.Get("/stars", repo.Stars) m.Get("/watchers", repo.Watchers) @@ -591,7 +591,7 @@ func runWeb(ctx *cli.Context) error { m.Group("/:reponame", func() { m.Get("", repo.SetEditorconfigIfExists, repo.Home) m.Get("\\.git$", repo.SetEditorconfigIfExists, repo.Home) - }, ignSignIn, context.RepoAssignment(true), context.RepoRef()) + }, ignSignIn, context.RepoAssignment(true), context.RepoRef(), context.UnitTypes()) m.Group("/:reponame", func() { m.Group("/info/lfs", func() { |