take references rather than owned value for render_search

This commit is contained in:
Louis Dureuil 2025-06-02 14:05:46 +02:00
parent 4fc0fd615a
commit 8a02b84f9b
No known key found for this signature in database

View File

@ -107,7 +107,7 @@ impl JsonTemplate {
/// # Error
///
/// - 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!({
"q": q,
"media": media