Api call to remove branch

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets 2014-05-22 14:39:50 +03:00
parent 0455391add
commit a9d60b3b14
No known key found for this signature in database
GPG key ID: 627C5F589F467F17

View file

@ -84,6 +84,18 @@ module API
present @branch, with: Entities::RepoObject, project: user_project present @branch, with: Entities::RepoObject, project: user_project
end end
# Delete branch
#
# Parameters:
# id (required) - The ID of a project
# branch (required) - The name of the branch
# Example Request:
# DELETE /projects/:id/repository/branches/:branch
delete ":id/repository/branches/:branch" do
authorize_push_project
DeleteBranchService.new.execute(user_project, params[:branch], current_user)
end
end end
end end
end end