diff options
Diffstat (limited to 'routers/api/v1/miscellaneous.go')
-rw-r--r-- | routers/api/v1/miscellaneous.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/api/v1/miscellaneous.go b/routers/api/v1/miscellaneous.go index 0da5dc15..7ffce857 100644 --- a/routers/api/v1/miscellaneous.go +++ b/routers/api/v1/miscellaneous.go @@ -16,7 +16,7 @@ import ( // Render an arbitrary Markdown document. func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) { if ctx.HasApiError() { - ctx.JSON(422, base.ApiJsonErr{ctx.GetErrMsg(), base.DOC_URL}) + ctx.APIError(422, "", ctx.GetErrMsg()) return } @@ -38,7 +38,7 @@ func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) { func MarkdownRaw(ctx *middleware.Context) { body, err := ctx.Req.Body().Bytes() if err != nil { - ctx.JSON(422, base.ApiJsonErr{err.Error(), base.DOC_URL}) + ctx.APIError(422, "", err) return } ctx.Write(base.RenderRawMarkdown(body, "")) |