diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-10-18 23:26:55 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-10-18 23:26:55 -0400 |
commit | 3abc41cccab2486012b46305827433ad6f5deade (patch) | |
tree | 91f34bbc2dcfe9266039aafdddbb6be45c7464f4 /routers/api/v1 | |
parent | 9e3a1bc11af8ab95a4d6b47607a89207941a3119 (diff) | |
download | gitea-3abc41cccab2486012b46305827433ad6f5deade.tar.gz gitea-3abc41cccab2486012b46305827433ad6f5deade.zip |
Fix API broken
Diffstat (limited to 'routers/api/v1')
-rw-r--r-- | routers/api/v1/miscellaneous.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/api/v1/miscellaneous.go b/routers/api/v1/miscellaneous.go index 088bcd9c94..f75ae264c2 100644 --- a/routers/api/v1/miscellaneous.go +++ b/routers/api/v1/miscellaneous.go @@ -5,7 +5,6 @@ package v1 import ( - "io/ioutil" "strings" "github.com/gogits/gogs/modules/auth/apiv1" @@ -34,7 +33,7 @@ func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) { // Render a Markdown document in raw mode. func MarkdownRaw(ctx *middleware.Context) { - body, err := ioutil.ReadAll(ctx.Req.Body) + body, err := ctx.Req.Body().Bytes() if err != nil { ctx.JSON(422, base.ApiJsonErr{err.Error(), DOC_URL}) return |