diff options
author | Joris | 2021-10-09 10:27:45 +0200 |
---|---|---|
committer | Joris | 2021-10-10 21:21:32 +0200 |
commit | af1177e814d19e63ce39c42fc7c5888e4b3d9604 (patch) | |
tree | 9e8d495f21a82e8cff92fe7692eb856b0e900e07 /src/queries.rs | |
parent | a370f989fe3b864676ed9aecf57f70e55e7958b2 (diff) |
Search by category
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 { |