diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/blob_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/edit_tree_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/new_tree_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/notes_controller.rb | 4 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/search_controller.rb | 4 |
8 files changed, 13 insertions, 13 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 7e3e29f59fb..ea20595047c 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -19,7 +19,7 @@ class Admin::ProjectsController < Admin::ApplicationController end def transfer - result = ::Projects::TransferContext.new(@project, current_user, project: params).execute(:admin) + result = ::Projects::TransferService.new(@project, current_user, project: params).execute(:admin) if result redirect_to [:admin, @project] diff --git a/app/controllers/projects/blob_controller.rb b/app/controllers/projects/blob_controller.rb index fc9807e3c47..2aa73471e2b 100644 --- a/app/controllers/projects/blob_controller.rb +++ b/app/controllers/projects/blob_controller.rb @@ -13,7 +13,7 @@ class Projects::BlobController < Projects::ApplicationController end def destroy - result = Files::DeleteContext.new(@project, current_user, params, @ref, @path).execute + result = Files::DeleteService.new(@project, current_user, params, @ref, @path).execute if result[:status] == :success flash[:notice] = "Your changes have been successfully committed" diff --git a/app/controllers/projects/edit_tree_controller.rb b/app/controllers/projects/edit_tree_controller.rb index 3921273620c..aa4631300e0 100644 --- a/app/controllers/projects/edit_tree_controller.rb +++ b/app/controllers/projects/edit_tree_controller.rb @@ -7,7 +7,7 @@ class Projects::EditTreeController < Projects::BaseTreeController end def update - result = Files::UpdateContext.new(@project, current_user, params, @ref, @path).execute + result = Files::UpdateService.new(@project, current_user, params, @ref, @path).execute if result[:status] == :success flash[:notice] = "Your changes have been successfully committed" diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 83ff968c70f..770fccaa11b 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -89,7 +89,7 @@ class Projects::IssuesController < Projects::ApplicationController end def bulk_update - result = Issues::BulkUpdateContext.new(project, current_user, params).execute + result = Issues::BulkUpdateService.new(project, current_user, params).execute redirect_to :back, notice: "#{result[:count]} issues updated" end diff --git a/app/controllers/projects/new_tree_controller.rb b/app/controllers/projects/new_tree_controller.rb index 933a0cb876e..2f3647ab071 100644 --- a/app/controllers/projects/new_tree_controller.rb +++ b/app/controllers/projects/new_tree_controller.rb @@ -6,7 +6,7 @@ class Projects::NewTreeController < Projects::BaseTreeController def update file_path = File.join(@path, File.basename(params[:file_name])) - result = Files::CreateContext.new(@project, current_user, params, @ref, file_path).execute + result = Files::CreateService.new(@project, current_user, params, @ref, file_path).execute if result[:status] == :success flash[:notice] = "Your changes have been successfully committed" diff --git a/app/controllers/projects/notes_controller.rb b/app/controllers/projects/notes_controller.rb index 261841f1ea2..9c9c2decc78 100644 --- a/app/controllers/projects/notes_controller.rb +++ b/app/controllers/projects/notes_controller.rb @@ -5,7 +5,7 @@ class Projects::NotesController < Projects::ApplicationController before_filter :authorize_admin_note!, only: [:update, :destroy] def index - @notes = Notes::LoadContext.new(project, current_user, params).execute + @notes = Notes::LoadService.new(project, current_user, params).execute notes_json = { notes: [] } @@ -20,7 +20,7 @@ class Projects::NotesController < Projects::ApplicationController end def create - @note = Notes::CreateContext.new(project, current_user, params).execute + @note = Notes::CreateService.new(project, current_user, params).execute respond_to do |format| format.json { render_note_json(@note) } diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e1c55e7d913..6ec109b9145 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -20,7 +20,7 @@ class ProjectsController < ApplicationController end def create - @project = ::Projects::CreateContext.new(current_user, params[:project]).execute + @project = ::Projects::CreateService.new(current_user, params[:project]).execute respond_to do |format| flash[:notice] = 'Project was successfully created.' if @project.saved? @@ -36,7 +36,7 @@ class ProjectsController < ApplicationController end def update - status = ::Projects::UpdateContext.new(@project, current_user, params).execute + status = ::Projects::UpdateService.new(@project, current_user, params).execute respond_to do |format| if status @@ -51,7 +51,7 @@ class ProjectsController < ApplicationController end def transfer - ::Projects::TransferContext.new(project, current_user, params).execute + ::Projects::TransferService.new(project, current_user, params).execute end def show @@ -89,7 +89,7 @@ class ProjectsController < ApplicationController end def fork - @forked_project = ::Projects::ForkContext.new(project, current_user).execute + @forked_project = ::Projects::ForkService.new(project, current_user).execute respond_to do |format| format.html do diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index ba8f08c5b82..e853c22800a 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -5,9 +5,9 @@ class SearchController < ApplicationController if @project return access_denied! unless can?(current_user, :download_code, @project) - @search_results = Search::ProjectContext.new(@project, current_user, params).execute + @search_results = Search::ProjectService.new(@project, current_user, params).execute else - @search_results = Search::GlobalContext.new(current_user, params).execute + @search_results = Search::GlobalService.new(current_user, params).execute end end end |