aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-10-18 23:26:55 -0400
committerUnknwon <joe2010xtmf@163.com>2014-10-18 23:26:55 -0400
commit3abc41cccab2486012b46305827433ad6f5deade (patch)
tree91f34bbc2dcfe9266039aafdddbb6be45c7464f4 /routers/api/v1
parent9e3a1bc11af8ab95a4d6b47607a89207941a3119 (diff)
downloadgitea-3abc41cccab2486012b46305827433ad6f5deade.tar.gz
gitea-3abc41cccab2486012b46305827433ad6f5deade.zip
Fix API broken
Diffstat (limited to 'routers/api/v1')
-rw-r--r--routers/api/v1/miscellaneous.go3
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