summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/release.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/release.go
parent370516883717de0e6e2087c12d368eb1465ee3b0 (diff)
downloadgitea-33e0b38287fdc3487112062300b8dd3c95415ee7.tar.gz
gitea-33e0b38287fdc3487112062300b8dd3c95415ee7.zip
Rename context.Query to context.Form (#16562)
Diffstat (limited to 'routers/web/repo/release.go')
-rw-r--r--routers/web/repo/release.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go
index 0665496d44..d0e59c8fa4 100644
--- a/routers/web/repo/release.go
+++ b/routers/web/repo/release.go
@@ -96,8 +96,8 @@ func releasesOrTags(ctx *context.Context, isTagList bool) {
opts := models.FindReleasesOptions{
ListOptions: models.ListOptions{
- Page: ctx.QueryInt("page"),
- PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")),
+ Page: ctx.FormInt("page"),
+ PageSize: convert.ToCorrectPageSize(ctx.FormInt("limit")),
},
IncludeDrafts: writeAccess && !isTagList,
IncludeTags: isTagList,
@@ -252,7 +252,7 @@ func NewRelease(ctx *context.Context) {
ctx.Data["RequireSimpleMDE"] = true
ctx.Data["RequireTribute"] = true
ctx.Data["tag_target"] = ctx.Repo.Repository.DefaultBranch
- if tagName := ctx.Query("tag"); len(tagName) > 0 {
+ if tagName := ctx.Form("tag"); len(tagName) > 0 {
rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName)
if err != nil && !models.IsErrReleaseNotExist(err) {
ctx.ServerError("GetRelease", err)
@@ -507,7 +507,7 @@ func DeleteTag(ctx *context.Context) {
}
func deleteReleaseOrTag(ctx *context.Context, isDelTag bool) {
- if err := releaseservice.DeleteReleaseByID(ctx.QueryInt64("id"), ctx.User, isDelTag); err != nil {
+ if err := releaseservice.DeleteReleaseByID(ctx.FormInt64("id"), ctx.User, isDelTag); err != nil {
ctx.Flash.Error("DeleteReleaseByID: " + err.Error())
} else {
if isDelTag {