summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/lfs.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/web/repo/lfs.go
parent370516883717de0e6e2087c12d368eb1465ee3b0 (diff)
downloadgitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz
gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'routers/web/repo/lfs.go')
-rw-r--r--routers/web/repo/lfs.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/web/repo/lfs.go b/routers/web/repo/lfs.go
index 173ffb773f..e41319d71e 100644
--- a/routers/web/repo/lfs.go
+++ b/routers/web/repo/lfs.go
@@ -42,7 +42,7 @@ func LFSFiles(ctx *context.Context) {
ctx.NotFound("LFSFiles", nil)
return
}
- page := ctx.QueryInt("page")
+ page := ctx.FormInt("page")
if page <= 1 {
page = 1
}
@@ -74,7 +74,7 @@ func LFSLocks(ctx *context.Context) {
}
ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs"
- page := ctx.QueryInt("page")
+ page := ctx.FormInt("page")
if page <= 1 {
page = 1
}
@@ -195,7 +195,7 @@ func LFSLockFile(ctx *context.Context) {
ctx.NotFound("LFSLocks", nil)
return
}
- originalPath := ctx.Query("path")
+ originalPath := ctx.Form("path")
lockPath := originalPath
if len(lockPath) == 0 {
ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_locking_path", originalPath))
@@ -366,13 +366,13 @@ func LFSFileFind(ctx *context.Context) {
ctx.NotFound("LFSFind", nil)
return
}
- oid := ctx.Query("oid")
- size := ctx.QueryInt64("size")
+ oid := ctx.Form("oid")
+ size := ctx.FormInt64("size")
if len(oid) == 0 || size == 0 {
ctx.NotFound("LFSFind", nil)
return
}
- sha := ctx.Query("sha")
+ sha := ctx.Form("sha")
ctx.Data["Title"] = oid
ctx.Data["PageIsSettingsLFS"] = true
var hash git.SHA1
@@ -511,7 +511,7 @@ func LFSAutoAssociate(ctx *context.Context) {
ctx.NotFound("LFSAutoAssociate", nil)
return
}
- oids := ctx.QueryStrings("oid")
+ oids := ctx.FormStrings("oid")
metas := make([]*models.LFSMetaObject, len(oids))
for i, oid := range oids {
idx := strings.IndexRune(oid, ' ')