]> source.dussan.org Git - gitea.git/commitdiff
reduce code
authorUnknwon <u@gogs.io>
Thu, 22 Oct 2015 21:47:08 +0000 (17:47 -0400)
committerUnknwon <u@gogs.io>
Thu, 22 Oct 2015 21:47:08 +0000 (17:47 -0400)
cmd/web.go

index 45a5ff2fa90b5d7e13e03a011b00b89ebeec70a7..23976535342b72ae7d600a86e6ea377ab12264b1 100644 (file)
@@ -228,8 +228,8 @@ func runWeb(ctx *cli.Context) {
 
                        m.Group("/repos", func() {
                                m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), v1.MigrateRepo)
-                               m.Combo("/:username/:reponame").Get(v1.GetRepo)
-                               m.Delete("/:username/:reponame", v1.DeleteRepo)
+                               m.Combo("/:username/:reponame").Get(v1.GetRepo).
+                                       Delete(v1.DeleteRepo)
 
                                m.Group("/:username/:reponame", func() {
                                        m.Combo("/hooks").Get(v1.ListRepoHooks).