summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-11-07 14:46:13 -0500
committerUnknwon <joe2010xtmf@163.com>2014-11-07 14:46:13 -0500
commitabc57b6e439c5ab9c3b6ed2cedeb10d50f5ae619 (patch)
treef3625f90376d6c4fe2f1ee7a05ba23a5e0b10d9e /cmd
parenta01b4baca2c1a1d011f19f2255eb9b703658b3dd (diff)
downloadgitea-abc57b6e439c5ab9c3b6ed2cedeb10d50f5ae619.tar.gz
gitea-abc57b6e439c5ab9c3b6ed2cedeb10d50f5ae619.zip
work on #609
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 289e07285f..b5690c87c1 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -64,7 +64,7 @@ func checkVersion() {
// Check dependency version.
macaronVer := git.MustParseVersion(strings.Join(strings.Split(macaron.Version(), ".")[:3], "."))
- if macaronVer.LessThan(git.MustParseVersion("0.2.3")) {
+ if macaronVer.LessThan(git.MustParseVersion("0.4.0")) {
log.Fatal(4, "Package macaron version is too old, did you forget to update?(github.com/Unknwon/macaron)")
}
i18nVer := git.MustParseVersion(i18n.Version())
@@ -354,7 +354,6 @@ func runWeb(*cli.Context) {
m.Post("/labels/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
m.Post("/labels/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
m.Post("/labels/delete", repo.DeleteLabel)
- m.Get("/milestones", repo.Milestones)
m.Get("/milestones/new", repo.NewMilestone)
m.Post("/milestones/new", bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost)
m.Get("/milestones/:index/edit", repo.UpdateMilestone)
@@ -364,31 +363,28 @@ func runWeb(*cli.Context) {
m.Post("/comment/:action", repo.Comment)
m.Get("/releases/new", repo.NewRelease)
- m.Get("/releases/edit/:tagname", repo.EditRelease)
- }, reqSignIn, middleware.RepoAssignment(true))
-
- m.Group("/:username/:reponame", func() {
m.Post("/releases/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost)
+ m.Get("/releases/edit/:tagname", repo.EditRelease)
m.Post("/releases/edit/:tagname", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost)
}, reqSignIn, middleware.RepoAssignment(true))
m.Group("/:username/:reponame", func() {
+ m.Get("/releases", repo.Releases)
m.Get("/issues", repo.Issues)
m.Get("/issues/:index", repo.ViewIssue)
+ m.Get("/issues/milestones", repo.Milestones)
m.Get("/pulls", repo.Pulls)
m.Get("/branches", repo.Branches)
m.Get("/archive/*", repo.Download)
m.Get("/issues2/", repo.Issues2)
- }, ignSignIn, middleware.RepoAssignment(true))
- m.Group("/:username/:reponame", func() {
m.Group("", func() {
m.Get("/src/*", repo.Home)
m.Get("/raw/*", repo.SingleDownload)
m.Get("/commits/*", repo.RefCommits)
m.Get("/commit/*", repo.Diff)
}, middleware.RepoRef())
- m.Get("/releases", repo.Releases)
+
m.Get("/compare/:before([a-z0-9]+)...:after([a-z0-9]+)", repo.CompareDiff)
}, ignSignIn, middleware.RepoAssignment(true))