diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-04-20 00:37:44 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-04-20 00:37:44 +0000 |
commit | d170133bded904603833f1b9e2727def3805962d (patch) | |
tree | a1c1e1f9973b43a5ff2482d4e1b91b219c5ac3af /lib/api/files.rb | |
parent | bfb635a4afea60751a44e6454f9c36850b5342c9 (diff) | |
download | gitlab-ce-d170133bded904603833f1b9e2727def3805962d.tar.gz |
Refactor changing files in web UI
Diffstat (limited to 'lib/api/files.rb')
-rw-r--r-- | lib/api/files.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb index 33fc970dc09..e6ea12c5ab7 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -5,7 +5,7 @@ module API { file_path: attrs[:file_path], start_branch: attrs[:branch], - target_branch: attrs[:branch], + branch_name: attrs[:branch], commit_message: attrs[:commit_message], file_content: attrs[:content], file_content_encoding: attrs[:encoding], @@ -130,7 +130,7 @@ module API authorize! :push_code, user_project file_params = declared_params(include_missing: false) - result = ::Files::DestroyService.new(user_project, current_user, commit_params(file_params)).execute + result = ::Files::DeleteService.new(user_project, current_user, commit_params(file_params)).execute if result[:status] != :success render_api_error!(result[:message], 400) |