forked from forgejo/forgejo
Rename context.Query to context.Form (#16562)
This commit is contained in:
parent
3705168837
commit
33e0b38287
85 changed files with 393 additions and 396 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue