diff options
Diffstat (limited to 'app/services/search')
-rw-r--r-- | app/services/search/global_service.rb | 18 | ||||
-rw-r--r-- | app/services/search/project_service.rb | 15 | ||||
-rw-r--r-- | app/services/search/snippet_service.rb | 14 |
3 files changed, 0 insertions, 47 deletions
diff --git a/app/services/search/global_service.rb b/app/services/search/global_service.rb deleted file mode 100644 index 0bcc50c81a7..00000000000 --- a/app/services/search/global_service.rb +++ /dev/null @@ -1,18 +0,0 @@ -module Search - class GlobalService - attr_accessor :current_user, :params - - def initialize(user, params) - @current_user, @params = user, params.dup - end - - def execute - group = Group.find_by(id: params[:group_id]) if params[:group_id].present? - projects = ProjectsFinder.new.execute(current_user) - projects = projects.where(namespace_id: group.id) if group - project_ids = projects.pluck(:id) - - Gitlab::SearchResults.new(project_ids, params[:search]) - end - end -end diff --git a/app/services/search/project_service.rb b/app/services/search/project_service.rb deleted file mode 100644 index f630c0a3790..00000000000 --- a/app/services/search/project_service.rb +++ /dev/null @@ -1,15 +0,0 @@ -module Search - class ProjectService - attr_accessor :project, :current_user, :params - - def initialize(project, user, params) - @project, @current_user, @params = project, user, params.dup - end - - def execute - Gitlab::ProjectSearchResults.new(project.id, - params[:search], - params[:repository_ref]) - end - end -end diff --git a/app/services/search/snippet_service.rb b/app/services/search/snippet_service.rb deleted file mode 100644 index 8ca0877321d..00000000000 --- a/app/services/search/snippet_service.rb +++ /dev/null @@ -1,14 +0,0 @@ -module Search - class SnippetService - attr_accessor :current_user, :params - - def initialize(user, params) - @current_user, @params = user, params.dup - end - - def execute - snippet_ids = Snippet.accessible_to(current_user).pluck(:id) - Gitlab::SnippetSearchResults.new(snippet_ids, params[:search]) - end - end -end |