about summary refs log tree commit diff
path: root/app/services/search_service.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-09-28 01:02:21 +0200
committerGitHub <noreply@github.com>2019-09-28 01:02:21 +0200
commitab33c4df942ec3fdc4d891f3db7ac8cdd3436945 (patch)
treeb526a52c980fef122d38302234c0bb8361f6bd14 /app/services/search_service.rb
parent234c729c5244160c89070960fd06de23ae31e13a (diff)
Add `exclude_unreviewed` param to `GET /api/v2/search` REST API (#11977)
Make it so normal search returns even unreviewed matches, but
autosuggestions do not.

Fix #11960
Diffstat (limited to 'app/services/search_service.rb')
-rw-r--r--app/services/search_service.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/services/search_service.rb b/app/services/search_service.rb
index a5ba5dd11..3a498dcf4 100644
--- a/app/services/search_service.rb
+++ b/app/services/search_service.rb
@@ -60,7 +60,8 @@ class SearchService < BaseService
     TagSearchService.new.call(
       @query,
       limit: @limit,
-      offset: @offset
+      offset: @offset,
+      exclude_unreviewed: @options[:exclude_unreviewed]
     )
   end