mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
Rename context.Query to context.Form (#16562)
This commit is contained in:
parent
3705168837
commit
33e0b38287
85 changed files with 393 additions and 396 deletions
|
@ -57,12 +57,12 @@ func Branches(ctx *context.Context) {
|
|||
ctx.Data["PageIsViewCode"] = true
|
||||
ctx.Data["PageIsBranches"] = true
|
||||
|
||||
page := ctx.QueryInt("page")
|
||||
page := ctx.FormInt("page")
|
||||
if page <= 1 {
|
||||
page = 1
|
||||
}
|
||||
|
||||
limit := ctx.QueryInt("limit")
|
||||
limit := ctx.FormInt("limit")
|
||||
if limit <= 0 || limit > setting.Git.BranchesRangeSize {
|
||||
limit = setting.Git.BranchesRangeSize
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ func Branches(ctx *context.Context) {
|
|||
// DeleteBranchPost responses for delete merged branch
|
||||
func DeleteBranchPost(ctx *context.Context) {
|
||||
defer redirect(ctx)
|
||||
branchName := ctx.Query("name")
|
||||
branchName := ctx.Form("name")
|
||||
|
||||
if err := repo_service.DeleteBranch(ctx.User, ctx.Repo.Repository, ctx.Repo.GitRepo, branchName); err != nil {
|
||||
switch {
|
||||
|
@ -112,8 +112,8 @@ func DeleteBranchPost(ctx *context.Context) {
|
|||
func RestoreBranchPost(ctx *context.Context) {
|
||||
defer redirect(ctx)
|
||||
|
||||
branchID := ctx.QueryInt64("branch_id")
|
||||
branchName := ctx.Query("name")
|
||||
branchID := ctx.FormInt64("branch_id")
|
||||
branchName := ctx.Form("name")
|
||||
|
||||
deletedBranch, err := ctx.Repo.Repository.GetDeletedBranchByID(branchID)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue