summaryrefslogtreecommitdiff
path: root/app/services/search/snippet_service.rb
blob: 30401b285716a7c067dc66d77cff9617a39a5d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Search
  class SnippetService < Search::GlobalService
    def execute
      Gitlab::SnippetSearchResults.new(current_user, params[:search])
    end

    def scope
      @scope ||= 'snippet_titles'
    end
  end
end

Search::SnippetService.prepend_if_ee('::EE::Search::SnippetService')