diff options
Diffstat (limited to 'src/queries.rs')
-rw-r--r-- | src/queries.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/queries.rs b/src/queries.rs index a7ba28c..df57bd8 100644 --- a/src/queries.rs +++ b/src/queries.rs @@ -7,6 +7,7 @@ pub struct Payments { pub search: Option<String>, pub frequency: Option<Frequency>, pub highlight: Option<i64>, + pub category: Option<i64>, } pub fn payments_url(q: Payments) -> String { @@ -38,6 +39,11 @@ pub fn payments_url(q: Payments) -> String { _ => (), }; + match q.category { + Some(id) => params.push(format!("category={}", id)), + _ => (), + }; + if params.is_empty() { "".to_string() } else { |