diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-30 17:28:59 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-10-30 17:28:59 +0200 |
commit | 961a6bfcc2f0b1063445143ba8841e6c6dcea8bf (patch) | |
tree | 8d83d772356276deca88d1041a171240a2511aad /lib/api/branches.rb | |
parent | 8388bbe82918d2fca2600620f48e048ccfab2c97 (diff) | |
download | gitlab-ce-961a6bfcc2f0b1063445143ba8841e6c6dcea8bf.tar.gz |
API delete branch: render branch name json instead of true
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api/branches.rb')
-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 |