2018-07-18 16:03:33 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-08-29 19:22:45 +00:00
|
|
|
module Search
|
2019-10-17 12:07:33 +00:00
|
|
|
class SnippetService < Search::GlobalService
|
2014-08-29 19:22:45 +00:00
|
|
|
def execute
|
2019-09-30 15:08:09 +00:00
|
|
|
Gitlab::SnippetSearchResults.new(current_user, params[:search])
|
2014-08-29 19:22:45 +00:00
|
|
|
end
|
2017-03-31 13:03:55 +00:00
|
|
|
|
|
|
|
def scope
|
2020-04-29 09:10:04 +00:00
|
|
|
@scope ||= 'snippet_titles'
|
2017-03-31 13:03:55 +00:00
|
|
|
end
|
2014-08-29 19:22:45 +00:00
|
|
|
end
|
|
|
|
end
|
2019-09-13 13:26:31 +00:00
|
|
|
|
2021-05-11 21:10:21 +00:00
|
|
|
Search::SnippetService.prepend_mod_with('Search::SnippetService')
|