diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-31 09:38:24 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2014-10-31 09:38:24 +0000 |
commit | aa75a755ee8767c66d16fe93a48dd3f9e24a4784 (patch) | |
tree | a42879302e0cfd0a109a2f8d032f5727b7de2a03 /lib | |
parent | 5a699090cde818294fca93d2793dd6195c0a7c2d (diff) | |
parent | 20e04d9f398b1f4221fa9f5de529dea7c2f0f9c1 (diff) | |
download | gitlab-ce-aa75a755ee8767c66d16fe93a48dd3f9e24a4784.tar.gz |
Merge branch 'api-delete-branch-json' into 'master'
Api delete branch json
Fixes gitlab/gitlabhq#1478
See merge request !1233
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/branches.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb index 14f8b20f6b2..6ec1a753a69 100644 --- a/lib/api/branches.rb +++ b/lib/api/branches.rb @@ -82,6 +82,7 @@ module API authorize_push_project result = CreateBranchService.new(user_project, current_user). execute(params[:branch_name], params[:ref]) + if result[:status] == :success present result[:branch], with: Entities::RepoObject, @@ -104,7 +105,9 @@ module API execute(params[:branch]) if result[:status] == :success - true + { + branch_name: params[:branch] + } else render_api_error!(result[:message], result[:return_code]) end |