diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-14 01:57:25 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-14 01:57:25 -0400 |
commit | f644cefa865c04b440902695ba90114b224c640d (patch) | |
tree | 0046427683c47bbc0487d0d053ee643ffef902c8 /web.go | |
parent | 190b83e05eb1ade979c0e17314ab892832d62e5b (diff) | |
download | gitea-f644cefa865c04b440902695ba90114b224c640d.tar.gz gitea-f644cefa865c04b440902695ba90114b224c640d.zip |
Finish release
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -63,7 +63,7 @@ func runWeb(*cli.Context) { SignInRequire: base.Service.RequireSignInView, DisableCsrf: true, }) - + reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true}) bindIgnErr := middleware.BindIgnErr @@ -153,13 +153,16 @@ func runWeb(*cli.Context) { r.Post("/issues/new", bindIgnErr(auth.CreateIssueForm{}), repo.CreateIssuePost) r.Post("/issues/:index", bindIgnErr(auth.CreateIssueForm{}), repo.UpdateIssue) r.Post("/comment/:action", repo.Comment) + r.Get("/releases/new", repo.ReleasesNew) }, reqSignIn, middleware.RepoAssignment(true)) m.Group("/:username/:reponame", func(r martini.Router) { + r.Post("/releases/new", bindIgnErr(auth.NewReleaseForm{}), repo.ReleasesNewPost) + }, reqSignIn, middleware.RepoAssignment(true, true)) + + m.Group("/:username/:reponame", func(r martini.Router) { r.Get("/issues", repo.Issues) r.Get("/issues/:index", repo.ViewIssue) - r.Get("/releases", repo.Releases) - r.Any("/releases/new", repo.ReleasesNew) // TODO: r.Get("/pulls", repo.Pulls) r.Get("/branches", repo.Branches) }, ignSignIn, middleware.RepoAssignment(true)) @@ -172,6 +175,7 @@ func runWeb(*cli.Context) { r.Get("/commits/:branchname/search", repo.SearchCommits) r.Get("/commit/:branchname", repo.Diff) r.Get("/commit/:branchname/**", repo.Diff) + r.Get("/releases", repo.Releases) }, ignSignIn, middleware.RepoAssignment(true, true)) m.Group("/:username", func(r martini.Router) { |