mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Fix API broken
This commit is contained in:
parent
9e3a1bc11a
commit
3abc41ccca
10 changed files with 12 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue