aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user
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/user
parent370516883717de0e6e2087c12d368eb1465ee3b0 (diff)
downloadgitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz
gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'routers/api/v1/user')
-rw-r--r--routers/api/v1/user/key.go2
-rw-r--r--routers/api/v1/user/user.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go
index 780cdf417c..284653b108 100644
--- a/routers/api/v1/user/key.go
+++ b/routers/api/v1/user/key.go
@@ -48,7 +48,7 @@ func listPublicKeys(ctx *context.APIContext, user *models.User) {
var keys []*models.PublicKey
var err error
- fingerprint := ctx.Query("fingerprint")
+ fingerprint := ctx.Form("fingerprint")
username := ctx.Params("username")
if fingerprint != "" {
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go
index ac543d597d..de1fd5a5c5 100644
--- a/routers/api/v1/user/user.go
+++ b/routers/api/v1/user/user.go
@@ -58,8 +58,8 @@ func Search(ctx *context.APIContext) {
opts := &models.SearchUserOptions{
Actor: ctx.User,
- Keyword: strings.Trim(ctx.Query("q"), " "),
- UID: ctx.QueryInt64("uid"),
+ Keyword: strings.Trim(ctx.Form("q"), " "),
+ UID: ctx.FormInt64("uid"),
Type: models.UserTypeIndividual,
ListOptions: listOptions,
}