summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/pull.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-07-29 09:42:15 +0800
committerGitHub <noreply@github.com>2021-07-29 03:42:15 +0200
commit33e0b38287fdc3487112062300b8dd3c95415ee7 (patch)
tree603394d8f303de1031c21da0d3d3a3cdc0b2bfda /routers/web/repo/pull.go
parent370516883717de0e6e2087c12d368eb1465ee3b0 (diff)
downloadgitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz
gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'routers/web/repo/pull.go')
-rw-r--r--routers/web/repo/pull.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go
index 565c645801..15c9f14808 100644
--- a/routers/web/repo/pull.go
+++ b/routers/web/repo/pull.go
@@ -1128,9 +1128,9 @@ func CompareAndPullRequestPost(ctx *context.Context) {
// TriggerTask response for a trigger task request
func TriggerTask(ctx *context.Context) {
- pusherID := ctx.QueryInt64("pusher")
- branch := ctx.Query("branch")
- secret := ctx.Query("secret")
+ pusherID := ctx.FormInt64("pusher")
+ branch := ctx.Form("branch")
+ secret := ctx.Form("secret")
if len(branch) == 0 || len(secret) == 0 || pusherID <= 0 {
ctx.Error(http.StatusNotFound)
log.Trace("TriggerTask: branch or secret is empty, or pusher ID is not valid")
@@ -1347,7 +1347,7 @@ func UpdatePullRequestTarget(ctx *context.Context) {
return
}
- targetBranch := ctx.QueryTrim("target_branch")
+ targetBranch := ctx.FormTrim("target_branch")
if len(targetBranch) == 0 {
ctx.Error(http.StatusNoContent)
return