mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00:00
Rename module: middleware -> context
This commit is contained in:
parent
cb1eadc276
commit
514382e2eb
54 changed files with 666 additions and 669 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue