diff --git a/src/compositions/betting/composition.rs b/src/compositions/betting/composition.rs index 57fb3f2..7b058af 100644 --- a/src/compositions/betting/composition.rs +++ b/src/compositions/betting/composition.rs @@ -203,7 +203,7 @@ impl Composition { Ok(query_ordery_by) } - fn get_find_all(&self, find_all: &models::FindAll) -> Result { + fn get_where(&self, find_all: &models::FindAll) -> Result { let mut query_where = String::new(); if let Some(s) = &find_all.search { @@ -519,7 +519,7 @@ impl Composition { write!(&mut query, "{}", BETTING_HISTORY_COUNT_QUERY) .map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?; - let query_where = self.get_find_all(find_all)?; + let query_where = self.get_where(find_all)?; if !query_where.is_empty() { write!(&mut query, " WHERE {}", query_where) .map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?; @@ -546,7 +546,7 @@ impl Composition { write!(&mut query, "{}", BETTING_HISTORY_QUERY) .map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?; - let query_where = self.get_find_all(find_all)?; + let query_where = self.get_where(find_all)?; if !query_where.is_empty() { write!(&mut query, " WHERE {}", query_where) .map_err(|e| diesel::result::Error::QueryBuilderError(e.to_string().into()))?;