summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/setting_protected_branch.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/setting_protected_branch.go')
-rw-r--r--routers/web/repo/setting_protected_branch.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/setting_protected_branch.go b/routers/web/repo/setting_protected_branch.go
index 7a1a3d0bcf..30c7d81b8e 100644
--- a/routers/web/repo/setting_protected_branch.go
+++ b/routers/web/repo/setting_protected_branch.go
@@ -60,14 +60,14 @@ func ProtectedBranchPost(ctx *context.Context) {
repo := ctx.Repo.Repository
- switch ctx.Form("action") {
+ switch ctx.FormString("action") {
case "default_branch":
if ctx.HasError() {
ctx.HTML(http.StatusOK, tplBranches)
return
}
- branch := ctx.Form("branch")
+ branch := ctx.FormString("branch")
if !ctx.Repo.GitRepo.IsBranchExist(branch) {
ctx.Status(404)
return