aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/private/branch.go2
-rw-r--r--routers/private/internal.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/private/branch.go b/routers/private/branch.go
index e74087950e..8e42f73039 100644
--- a/routers/private/branch.go
+++ b/routers/private/branch.go
@@ -13,7 +13,7 @@ import (
// GetProtectedBranchBy get protected branch information
func GetProtectedBranchBy(ctx *macaron.Context) {
repoID := ctx.ParamsInt64(":id")
- branchName := ctx.Params(":branch")
+ branchName := ctx.Params("*")
protectBranch, err := models.GetProtectedBranchBy(repoID, branchName)
if err != nil {
ctx.JSON(500, map[string]interface{}{
diff --git a/routers/private/internal.go b/routers/private/internal.go
index f663306e92..3e7233226a 100644
--- a/routers/private/internal.go
+++ b/routers/private/internal.go
@@ -42,6 +42,6 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Group("/", func() {
m.Post("/ssh/:id/update", UpdatePublicKey)
m.Post("/push/update", PushUpdate)
- m.Get("/branch/:id/:branch", GetProtectedBranchBy)
+ m.Get("/branch/:id/*", GetProtectedBranchBy)
}, CheckInternalToken)
}