debian-mirror-gitlab/app/services/search/snippet_service.rb
2020-05-25 16:23:42 +05:30

15 lines
323 B
Ruby

# 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')