summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc/markdown.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
committerUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
commit514382e2ebfe6869268aeb919c1fa4d224687e13 (patch)
tree1aa8c4b3b1e771a5dc6f0bdd74567961570efcaa /routers/api/v1/misc/markdown.go
parentcb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff)
downloadgitea-514382e2ebfe6869268aeb919c1fa4d224687e13.tar.gz
gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.zip
Rename module: middleware -> context
Diffstat (limited to 'routers/api/v1/misc/markdown.go')
-rw-r--r--routers/api/v1/misc/markdown.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go
index b98a362c3d..658f495ee5 100644
--- a/routers/api/v1/misc/markdown.go
+++ b/routers/api/v1/misc/markdown.go
@@ -7,12 +7,12 @@ package misc
import (
api "github.com/gogits/go-gogs-client"
+ "github.com/gogits/gogs/modules/context"
"github.com/gogits/gogs/modules/markdown"
- "github.com/gogits/gogs/modules/middleware"
)
// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-an-arbitrary-markdown-document
-func Markdown(ctx *middleware.Context, form api.MarkdownOption) {
+func Markdown(ctx *context.Context, form api.MarkdownOption) {
if ctx.HasApiError() {
ctx.APIError(422, "", ctx.GetErrMsg())
return
@@ -32,7 +32,7 @@ func Markdown(ctx *middleware.Context, form api.MarkdownOption) {
}
// https://github.com/gogits/go-gogs-client/wiki/Miscellaneous#render-a-markdown-document-in-raw-mode
-func MarkdownRaw(ctx *middleware.Context) {
+func MarkdownRaw(ctx *context.Context) {
body, err := ctx.Req.Body().Bytes()
if err != nil {
ctx.APIError(422, "", err)