diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-11-14 17:11:30 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-11-14 17:11:30 -0500 |
commit | 52d66ba6c8b44b4aa28bdc2cd50acba9e22b3e66 (patch) | |
tree | a556e4e5241ccf86787097c5f4cb8767fcf06830 /routers/api/v1/miscellaneous.go | |
parent | 437dd5272f557ffa3367a70230feeb1aa448b0e4 (diff) |
#12, use go-gogs-client
Diffstat (limited to 'routers/api/v1/miscellaneous.go')
-rw-r--r-- | routers/api/v1/miscellaneous.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/routers/api/v1/miscellaneous.go b/routers/api/v1/miscellaneous.go index f75ae264..b3291fc1 100644 --- a/routers/api/v1/miscellaneous.go +++ b/routers/api/v1/miscellaneous.go @@ -13,12 +13,10 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const DOC_URL = "http://gogs.io/docs" - // Render an arbitrary Markdown document. func Markdown(ctx *middleware.Context, form apiv1.MarkdownForm) { if ctx.HasApiError() { - ctx.JSON(422, base.ApiJsonErr{ctx.GetErrMsg(), DOC_URL}) + ctx.JSON(422, base.ApiJsonErr{ctx.GetErrMsg(), base.DOC_URL}) return } @@ -35,7 +33,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(), DOC_URL}) + ctx.JSON(422, base.ApiJsonErr{err.Error(), base.DOC_URL}) return } ctx.Write(base.RenderRawMarkdown(body, "")) |