@@ -487,7 +487,7 @@ func GetBranchProtection(ctx *context.APIContext) {
487487 // "$ref": "#/responses/notFound"
488488
489489 repo := ctx .Repo .Repository
490- bpName := ctx .PathParam (": name" )
490+ bpName := ctx .PathParam ("name" )
491491 bp , err := git_model .GetProtectedBranchRuleByName (ctx , repo .ID , bpName )
492492 if err != nil {
493493 ctx .Error (http .StatusInternalServerError , "GetProtectedBranchByID" , err )
@@ -805,7 +805,7 @@ func EditBranchProtection(ctx *context.APIContext) {
805805 // "$ref": "#/responses/repoArchivedError"
806806 form := web .GetForm (ctx ).(* api.EditBranchProtectionOption )
807807 repo := ctx .Repo .Repository
808- bpName := ctx .PathParam (": name" )
808+ bpName := ctx .PathParam ("name" )
809809 protectBranch , err := git_model .GetProtectedBranchRuleByName (ctx , repo .ID , bpName )
810810 if err != nil {
811811 ctx .Error (http .StatusInternalServerError , "GetProtectedBranchByID" , err )
@@ -1124,7 +1124,7 @@ func DeleteBranchProtection(ctx *context.APIContext) {
11241124 // "$ref": "#/responses/notFound"
11251125
11261126 repo := ctx .Repo .Repository
1127- bpName := ctx .PathParam (": name" )
1127+ bpName := ctx .PathParam ("name" )
11281128 bp , err := git_model .GetProtectedBranchRuleByName (ctx , repo .ID , bpName )
11291129 if err != nil {
11301130 ctx .Error (http .StatusInternalServerError , "GetProtectedBranchByID" , err )
0 commit comments