diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-07-29 09:42:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 03:42:15 +0200 |
commit | 33e0b38287fdc3487112062300b8dd3c95415ee7 (patch) | |
tree | 603394d8f303de1031c21da0d3d3a3cdc0b2bfda /services | |
parent | 370516883717de0e6e2087c12d368eb1465ee3b0 (diff) | |
download | gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip |
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'services')
-rw-r--r-- | services/lfs/locks.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/services/lfs/locks.go b/services/lfs/locks.go index 641c1c595b..be91dcc040 100644 --- a/services/lfs/locks.go +++ b/services/lfs/locks.go @@ -68,17 +68,17 @@ func GetListLockHandler(ctx *context.Context) { } ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) - cursor := ctx.QueryInt("cursor") + cursor := ctx.FormInt("cursor") if cursor < 0 { cursor = 0 } - limit := ctx.QueryInt("limit") + limit := ctx.FormInt("limit") if limit > setting.LFS.LocksPagingNum && setting.LFS.LocksPagingNum > 0 { limit = setting.LFS.LocksPagingNum } else if limit < 0 { limit = 0 } - id := ctx.Query("id") + id := ctx.Form("id") if id != "" { //Case where we request a specific id v, err := strconv.ParseInt(id, 10, 64) if err != nil { @@ -95,7 +95,7 @@ func GetListLockHandler(ctx *context.Context) { return } - path := ctx.Query("path") + path := ctx.Form("path") if path != "" { //Case where we request a specific id lock, err := models.GetLFSLock(repository, path) if err != nil && !models.IsErrLFSLockNotExist(err) { @@ -224,11 +224,11 @@ func VerifyLockHandler(ctx *context.Context) { ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) - cursor := ctx.QueryInt("cursor") + cursor := ctx.FormInt("cursor") if cursor < 0 { cursor = 0 } - limit := ctx.QueryInt("limit") + limit := ctx.FormInt("limit") if limit > setting.LFS.LocksPagingNum && setting.LFS.LocksPagingNum > 0 { limit = setting.LFS.LocksPagingNum } else if limit < 0 { |