From efa10c819d133407041bc9e89b4d2a43e64552fd Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 16 Jan 2014 20:35:21 +0200 Subject: Replace context with service in lib Signed-off-by: Dmitriy Zaporozhets --- lib/api/files.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/api/files.rb') 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) -- cgit v1.2.1