summaryrefslogtreecommitdiffstats
path: root/web.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-29 10:01:52 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-29 10:01:52 -0400
commit2c073afbec4b9845e8ddd10a4d3f469874fdcd37 (patch)
tree2ebca5026484dcc5aea2be1fb073c41c3edb7f3c /web.go
parentecce694d77756264864b03e6b06077592ed1676a (diff)
downloadgitea-2c073afbec4b9845e8ddd10a4d3f469874fdcd37.tar.gz
gitea-2c073afbec4b9845e8ddd10a4d3f469874fdcd37.zip
Mirror fix and update
Diffstat (limited to 'web.go')
-rw-r--r--web.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/web.go b/web.go
index 451e52ff8c..7725791e84 100644
--- a/web.go
+++ b/web.go
@@ -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)