diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-07-29 09:42:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 03:42:15 +0200 |
commit | 33e0b38287fdc3487112062300b8dd3c95415ee7 (patch) | |
tree | 603394d8f303de1031c21da0d3d3a3cdc0b2bfda /routers/web/repo/compare.go | |
parent | 370516883717de0e6e2087c12d368eb1465ee3b0 (diff) | |
download | gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip |
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'routers/web/repo/compare.go')
-rw-r--r-- | routers/web/repo/compare.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/routers/web/repo/compare.go b/routers/web/repo/compare.go index f405362cf5..45d0624ca2 100644 --- a/routers/web/repo/compare.go +++ b/routers/web/repo/compare.go @@ -696,15 +696,15 @@ func CompareDiff(ctx *context.Context) { // ExcerptBlob render blob excerpt contents func ExcerptBlob(ctx *context.Context) { commitID := ctx.Params("sha") - lastLeft := ctx.QueryInt("last_left") - lastRight := ctx.QueryInt("last_right") - idxLeft := ctx.QueryInt("left") - idxRight := ctx.QueryInt("right") - leftHunkSize := ctx.QueryInt("left_hunk_size") - rightHunkSize := ctx.QueryInt("right_hunk_size") - anchor := ctx.Query("anchor") - direction := ctx.Query("direction") - filePath := ctx.Query("path") + lastLeft := ctx.FormInt("last_left") + lastRight := ctx.FormInt("last_right") + idxLeft := ctx.FormInt("left") + idxRight := ctx.FormInt("right") + leftHunkSize := ctx.FormInt("left_hunk_size") + rightHunkSize := ctx.FormInt("right_hunk_size") + anchor := ctx.Form("anchor") + direction := ctx.Form("direction") + filePath := ctx.Form("path") gitRepo := ctx.Repo.GitRepo chunkSize := gitdiff.BlobExcerptChunkSize commit, err := gitRepo.GetCommit(commitID) |