Don't add empty search parameters to global search engine
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ac7b994b6f
commit
76ff11ceae
@ -70,7 +70,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
|
|||||||
:count,
|
:count,
|
||||||
:sortBy
|
:sortBy
|
||||||
])
|
])
|
||||||
|> Keyword.reject(fn {_key, val} -> is_nil(val) end)
|
|> Keyword.reject(fn {_key, val} -> is_nil(val) or val == "" end)
|
||||||
|
|
||||||
events_url = "#{search_endpoint()}#{@search_events_api}?#{encode(options)}"
|
events_url = "#{search_endpoint()}#{@search_events_api}?#{encode(options)}"
|
||||||
Logger.debug("Calling global search engine url #{events_url}")
|
Logger.debug("Calling global search engine url #{events_url}")
|
||||||
@ -117,7 +117,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
|
|||||||
:bbox,
|
:bbox,
|
||||||
:sortBy
|
:sortBy
|
||||||
])
|
])
|
||||||
|> Keyword.reject(fn {_key, val} -> is_nil(val) end)
|
|> Keyword.reject(fn {_key, val} -> is_nil(val) or val == "" end)
|
||||||
|
|
||||||
groups_url = "#{search_endpoint()}#{@search_groups_api}?#{encode(options)}"
|
groups_url = "#{search_endpoint()}#{@search_groups_api}?#{encode(options)}"
|
||||||
Logger.debug("Calling global search engine url #{groups_url}")
|
Logger.debug("Calling global search engine url #{groups_url}")
|
||||||
|
Loading…
Reference in New Issue
Block a user