diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-16 20:35:21 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-01-16 20:35:21 +0200 |
commit | efa10c819d133407041bc9e89b4d2a43e64552fd (patch) | |
tree | a7758b1c31bbb849713667367aa422fe7078ca40 /lib/api/files.rb | |
parent | 4a1654ed6a2393279ba6227454acbc3a80559d7d (diff) | |
download | gitlab-ce-efa10c819d133407041bc9e89b4d2a43e64552fd.tar.gz |
Replace context with service in lib
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api/files.rb')
-rw-r--r-- | lib/api/files.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb index 6a5419a580f..5e2a68809e5 100644 --- a/lib/api/files.rb +++ b/lib/api/files.rb @@ -21,7 +21,7 @@ module API attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message] branch_name = attrs.delete(:branch_name) file_path = attrs.delete(:file_path) - result = ::Files::CreateContext.new(user_project, current_user, attrs, branch_name, file_path).execute + result = ::Files::CreateService.new(user_project, current_user, attrs, branch_name, file_path).execute if result[:status] == :success status(201) @@ -51,7 +51,7 @@ module API attrs = attributes_for_keys [:file_path, :branch_name, :content, :commit_message] branch_name = attrs.delete(:branch_name) file_path = attrs.delete(:file_path) - result = ::Files::UpdateContext.new(user_project, current_user, attrs, branch_name, file_path).execute + result = ::Files::UpdateService.new(user_project, current_user, attrs, branch_name, file_path).execute if result[:status] == :success status(200) @@ -81,7 +81,7 @@ module API attrs = attributes_for_keys [:file_path, :branch_name, :commit_message] branch_name = attrs.delete(:branch_name) file_path = attrs.delete(:file_path) - result = ::Files::DeleteContext.new(user_project, current_user, attrs, branch_name, file_path).execute + result = ::Files::DeleteService.new(user_project, current_user, attrs, branch_name, file_path).execute if result[:status] == :success status(200) |