Fix global search term

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-10-06 09:53:54 +02:00
parent 0265e0220e
commit 1a31d9b54e
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -37,7 +37,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
options = options =
options options
|> Keyword.merge( |> Keyword.merge(
term: options[:search], search: options[:term],
startDateMin: to_date(options[:begins_on]), startDateMin: to_date(options[:begins_on]),
startDateMax: to_date(options[:ends_on]), startDateMax: to_date(options[:ends_on]),
categoryOneOf: options[:category_one_of], categoryOneOf: options[:category_one_of],
@ -95,7 +95,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
options = options =
options options
|> Keyword.merge( |> Keyword.merge(
term: options[:search], search: options[:term],
languageOneOf: options[:language_one_of], languageOneOf: options[:language_one_of],
boostLanguages: options[:boost_languages], boostLanguages: options[:boost_languages],
distance: if(options[:radius], do: "#{options[:radius]}_km", else: nil), distance: if(options[:radius], do: "#{options[:radius]}_km", else: nil),