|
|
@ -26,7 +26,6 @@ import ( |
|
|
|
"github.com/gogits/gogs/routers" |
|
|
|
"github.com/gogits/gogs/routers" |
|
|
|
"github.com/gogits/gogs/routers/admin" |
|
|
|
"github.com/gogits/gogs/routers/admin" |
|
|
|
"github.com/gogits/gogs/routers/api/v1" |
|
|
|
"github.com/gogits/gogs/routers/api/v1" |
|
|
|
"github.com/gogits/gogs/routers/debug" |
|
|
|
|
|
|
|
"github.com/gogits/gogs/routers/dev" |
|
|
|
"github.com/gogits/gogs/routers/dev" |
|
|
|
"github.com/gogits/gogs/routers/org" |
|
|
|
"github.com/gogits/gogs/routers/org" |
|
|
|
"github.com/gogits/gogs/routers/repo" |
|
|
|
"github.com/gogits/gogs/routers/repo" |
|
|
@ -185,6 +184,7 @@ func runWeb(*cli.Context) { |
|
|
|
|
|
|
|
|
|
|
|
if martini.Env == martini.Dev { |
|
|
|
if martini.Env == martini.Dev { |
|
|
|
m.Get("/template/**", dev.TemplatePreview) |
|
|
|
m.Get("/template/**", dev.TemplatePreview) |
|
|
|
|
|
|
|
dev.RegisterDebugRoutes(m) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
reqTrueOwner := middleware.RequireTrueOwner() |
|
|
|
reqTrueOwner := middleware.RequireTrueOwner() |
|
|
@ -206,8 +206,6 @@ func runWeb(*cli.Context) { |
|
|
|
r.Post("/:org/settings/delete", org.DeletePost) |
|
|
|
r.Post("/:org/settings/delete", org.DeletePost) |
|
|
|
}, reqSignIn) |
|
|
|
}, reqSignIn) |
|
|
|
|
|
|
|
|
|
|
|
debug.RegisterRoutes(m) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m.Group("/:username/:reponame", func(r martini.Router) { |
|
|
|
m.Group("/:username/:reponame", func(r martini.Router) { |
|
|
|
r.Get("/settings", repo.Setting) |
|
|
|
r.Get("/settings", repo.Setting) |
|
|
|
r.Post("/settings", bindIgnErr(auth.RepoSettingForm{}), repo.SettingPost) |
|
|
|
r.Post("/settings", bindIgnErr(auth.RepoSettingForm{}), repo.SettingPost) |
|
|
|