Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-17 13:47:47 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-01-17 13:47:47 +0400
commitf0d2d28118354b6362988687757b63dc7be611e5 (patch)
treec6b1abb371822ba5dd1f7fe4d92b494a30dae9bd /lib/api/files.rb
parent7527408ad0c72ea7b7aba5c14550c5b08b6aae60 (diff)
parent4d82e9ed0b6ddb45663bde71412de9c840c58337 (diff)
Merge branch 'refactoring/context_into_services' into 'master'
Refactoring context Into services To prevent confusion where to write logic. Context or Service?
Diffstat (limited to 'lib/api/files.rb')
-rw-r--r--lib/api/files.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/files.rb b/lib/api/files.rb
index 8e87ae52e64..213604915a6 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, :encoding]
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, :encoding]
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)