aboutsummaryrefslogtreecommitdiffstats
path: root/routers/private/default_branch.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/private/default_branch.go')
-rw-r--r--routers/private/default_branch.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/routers/private/default_branch.go b/routers/private/default_branch.go
index 33890be6a9..7be909f955 100644
--- a/routers/private/default_branch.go
+++ b/routers/private/default_branch.go
@@ -16,9 +16,9 @@ import (
// SetDefaultBranch updates the default branch
func SetDefaultBranch(ctx *gitea_context.PrivateContext) {
- ownerName := ctx.Params(":owner")
- repoName := ctx.Params(":repo")
- branch := ctx.Params(":branch")
+ ownerName := ctx.PathParam(":owner")
+ repoName := ctx.PathParam(":repo")
+ branch := ctx.PathParam(":branch")
ctx.Repo.Repository.DefaultBranch = branch
if err := gitrepo.SetDefaultBranch(ctx, ctx.Repo.Repository, ctx.Repo.Repository.DefaultBranch); err != nil {