1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Rename context.Query to context.Form (#16562)

This commit is contained in:
Lunny Xiao
2021-07-29 09:42:15 +08:00
committed by GitHub
parent 3705168837
commit 33e0b38287
85 changed files with 393 additions and 396 deletions

View File

@@ -27,7 +27,7 @@ func Notices(ctx *context.Context) {
ctx.Data["PageIsAdminNotices"] = true
total := models.CountNotices()
page := ctx.QueryInt("page")
page := ctx.FormInt("page")
if page <= 1 {
page = 1
}
@@ -48,7 +48,7 @@ func Notices(ctx *context.Context) {
// DeleteNotices delete the specific notices
func DeleteNotices(ctx *context.Context) {
strs := ctx.QueryStrings("ids[]")
strs := ctx.FormStrings("ids[]")
ids := make([]int64, 0, len(strs))
for i := range strs {
id, _ := strconv.ParseInt(strs[i], 10, 64)