Fix /api/v2/search
not working with following query param (#25681)
This commit is contained in:
@ -2,12 +2,13 @@
|
||||
|
||||
class SearchService < BaseService
|
||||
def call(query, account, limit, options = {})
|
||||
@query = query&.strip
|
||||
@account = account
|
||||
@options = options
|
||||
@limit = limit.to_i
|
||||
@offset = options[:type].blank? ? 0 : options[:offset].to_i
|
||||
@resolve = options[:resolve] || false
|
||||
@query = query&.strip
|
||||
@account = account
|
||||
@options = options
|
||||
@limit = limit.to_i
|
||||
@offset = options[:type].blank? ? 0 : options[:offset].to_i
|
||||
@resolve = options[:resolve] || false
|
||||
@following = options[:following] || false
|
||||
|
||||
default_results.tap do |results|
|
||||
next if @query.blank? || @limit.zero?
|
||||
@ -31,7 +32,8 @@ class SearchService < BaseService
|
||||
limit: @limit,
|
||||
resolve: @resolve,
|
||||
offset: @offset,
|
||||
use_searchable_text: true
|
||||
use_searchable_text: true,
|
||||
following: @following
|
||||
)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user