diff options
author | skyblue <ssx205@gmail.com> | 2014-03-24 23:08:58 +0800 |
---|---|---|
committer | skyblue <ssx205@gmail.com> | 2014-03-24 23:08:58 +0800 |
commit | 6e972afb1563d1eb585c9900e3c85330726d5b50 (patch) | |
tree | 26f20c8a199f8c9a39347de80bfe8b9e06f37e36 /web.go | |
parent | 3070c5513d9529dc62333522c3f92025fffab542 (diff) | |
parent | 8376b0d53cae91af0e180c05b9cb92c3f3f30d58 (diff) |
Merge branch 'master' of github.com:shxsun/gogs
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -31,9 +31,10 @@ import ( var CmdWeb = cli.Command{ Name: "web", - Usage: "just run", + Usage: "Gogs web server", Description: ` -gogs web`, +gogs web server is the only thing you need to run, +and it takes care of all the other things for you`, Action: runWeb, Flags: []cli.Flag{}, } @@ -88,7 +89,7 @@ func runWeb(*cli.Context) { reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true}) // Routers. - m.Get("/", ignSignIn, routers.Home) + m.Get("/", reqSignIn, routers.Home) m.Get("/issues", reqSignIn, user.Issues) m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/stars", reqSignIn, user.Stars) @@ -145,7 +146,8 @@ func runWeb(*cli.Context) { r.Get("/commits/:branchname", repo.Commits) r.Get("/issues", repo.Issues) r.Any("/issues/new", binding.BindIgnErr(auth.CreateIssueForm{}), repo.CreateIssue) - r.Get("/issues/:issueid", repo.ViewIssue) + r.Get("/issues/:index", repo.ViewIssue) + r.Post("/issues/:index", binding.BindIgnErr(auth.CreateIssueForm{}), repo.UpdateIssue) r.Get("/pulls", repo.Pulls) r.Get("/branches", repo.Branches) r.Get("/src/:branchname", repo.Single) |