mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Rename context.Query to context.Form (#16562)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user