aboutsummaryrefslogtreecommitdiffstats
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.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/setting/protected_branch.go b/routers/web/repo/setting/protected_branch.go
index 4bab3f897a..400186db67 100644
--- a/routers/web/repo/setting/protected_branch.go
+++ b/routers/web/repo/setting/protected_branch.go
@@ -266,7 +266,7 @@ func SettingsProtectedBranchPost(ctx *context.Context) {
// DeleteProtectedBranchRulePost delete protected branch rule by id
func DeleteProtectedBranchRulePost(ctx *context.Context) {
- ruleID := ctx.ParamsInt64("id")
+ ruleID := ctx.PathParamInt64("id")
if ruleID <= 0 {
ctx.Flash.Error(ctx.Tr("repo.settings.remove_protected_branch_failed", fmt.Sprintf("%d", ruleID)))
ctx.JSONRedirect(fmt.Sprintf("%s/settings/branches", ctx.Repo.RepoLink))