diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-29 10:01:52 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-29 10:01:52 -0400 |
commit | 2c073afbec4b9845e8ddd10a4d3f469874fdcd37 (patch) | |
tree | 2ebca5026484dcc5aea2be1fb073c41c3edb7f3c /web.go | |
parent | ecce694d77756264864b03e6b06077592ed1676a (diff) | |
download | gitea-2c073afbec4b9845e8ddd10a4d3f469874fdcd37.tar.gz gitea-2c073afbec4b9845e8ddd10a4d3f469874fdcd37.zip |
Mirror fix and update
Diffstat (limited to 'web.go')
-rw-r--r-- | web.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -24,6 +24,7 @@ import ( "github.com/gogits/gogs/modules/middleware" "github.com/gogits/gogs/routers" "github.com/gogits/gogs/routers/admin" + "github.com/gogits/gogs/routers/api/v1" "github.com/gogits/gogs/routers/dev" "github.com/gogits/gogs/routers/repo" "github.com/gogits/gogs/routers/user" @@ -72,6 +73,7 @@ func newMartini() *martini.ClassicMartini { } func runWeb(*cli.Context) { + fmt.Println("Server is running...") globalInit() base.NewServices() checkRunMode() @@ -95,7 +97,10 @@ func runWeb(*cli.Context) { m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/stars", reqSignIn, user.Stars) m.Get("/help", routers.Help) - m.Post("/preview", routers.Preview) + + m.Group("/api/v1", func(r martini.Router) { + r.Post("/markdown", v1.Markdown) + }) avt := avatar.CacheServer("public/img/avatar/", "public/img/avatar_default.jpg") m.Get("/avatar/:hash", avt.ServeHTTP) |