Allow ability to delete branches with '/` in name
This commit is contained in:
parent
d554070a62
commit
00dd44455a
1 changed files with 3 additions and 3 deletions
|
@ -1,5 +1,4 @@
|
|||
require 'mime/types'
|
||||
require 'uri'
|
||||
|
||||
module API
|
||||
# Projects API
|
||||
|
@ -101,10 +100,11 @@ module API
|
|||
# branch (required) - The name of the branch
|
||||
# Example Request:
|
||||
# DELETE /projects/:id/repository/branches/:branch
|
||||
delete ":id/repository/branches/:branch" do
|
||||
delete ":id/repository/branches/:branch"
|
||||
requirements: { branch: /.*/ } do
|
||||
authorize_push_project
|
||||
result = DeleteBranchService.new(user_project, current_user).
|
||||
execute(URI.unescape(params[:branch]))
|
||||
execute(params[:branch])
|
||||
|
||||
if result[:status] == :success
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue