IP: RC Code Review

This commit is contained in:
Unknown 2014-03-27 11:37:33 -04:00
parent c796ed3849
commit f470c241d6
9 changed files with 28 additions and 32 deletions

8
web.go
View file

@ -138,6 +138,10 @@ func runWeb(*cli.Context) {
r.Any("/:userid/delete", admin.DeleteUser)
}, adminReq)
if martini.Env == martini.Dev {
m.Get("/template/**", dev.TemplatePreview)
}
m.Group("/:username/:reponame", func(r martini.Router) {
r.Post("/settings", repo.SettingPost)
r.Get("/settings", repo.Setting)
@ -168,10 +172,6 @@ func runWeb(*cli.Context) {
r.Any("/:reponame/**", repo.Http)
}, ignSignIn)
if martini.Env == martini.Dev {
m.Get("/template/**", dev.TemplatePreview)
}
// Not found handler.
m.NotFound(routers.NotFound)