summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/status.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/api/v1/repo/status.go
parent370516883717de0e6e2087c12d368eb1465ee3b0 (diff)
downloadgitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz
gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'routers/api/v1/repo/status.go')
-rw-r--r--routers/api/v1/repo/status.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go
index 95c3f00a72..841f60bb56 100644
--- a/routers/api/v1/repo/status.go
+++ b/routers/api/v1/repo/status.go
@@ -190,11 +190,11 @@ func getCommitStatuses(ctx *context.APIContext, sha string) {
statuses, maxResults, err := models.GetCommitStatuses(repo, sha, &models.CommitStatusOptions{
ListOptions: listOptions,
- SortType: ctx.QueryTrim("sort"),
- State: ctx.QueryTrim("state"),
+ SortType: ctx.FormTrim("sort"),
+ State: ctx.FormTrim("state"),
})
if err != nil {
- ctx.Error(http.StatusInternalServerError, "GetCommitStatuses", fmt.Errorf("GetCommitStatuses[%s, %s, %d]: %v", repo.FullName(), sha, ctx.QueryInt("page"), err))
+ ctx.Error(http.StatusInternalServerError, "GetCommitStatuses", fmt.Errorf("GetCommitStatuses[%s, %s, %d]: %v", repo.FullName(), sha, ctx.FormInt("page"), err))
return
}