mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-06-11 06:27:51 +00:00
take references rather than owned value for render_search
This commit is contained in:
parent
4fc0fd615a
commit
8a02b84f9b
@ -107,7 +107,7 @@ impl JsonTemplate {
|
|||||||
/// # Error
|
/// # Error
|
||||||
///
|
///
|
||||||
/// - If any of the strings contains a template that cannot be rendered from the contents of the search query
|
/// - If any of the strings contains a template that cannot be rendered from the contents of the search query
|
||||||
pub fn render_search(&self, q: Option<String>, media: Value) -> Result<Value, Error> {
|
pub fn render_search(&self, q: Option<&str>, media: &Value) -> Result<Value, Error> {
|
||||||
let search_data = liquid::object!({
|
let search_data = liquid::object!({
|
||||||
"q": q,
|
"q": q,
|
||||||
"media": media
|
"media": media
|
||||||
|
Loading…
x
Reference in New Issue
Block a user