diff options
author | Guillaume Pasquet <dev@etenil.net> | 2022-03-03 23:18:08 +0000 |
---|---|---|
committer | Guillaume Pasquet <dev@etenil.net> | 2022-03-03 23:18:08 +0000 |
commit | 57af17cfa6e08a6fe9bf6d73d401af17dccfa3bb (patch) | |
tree | cd550ccf0eb78f360e6813ffdfd3c89d817eb21f /src/executor.rs | |
parent | f797f10c2eda28a221759fc26ddf483f41232604 (diff) |
Introduce JSONPath and potentially break old stuff.
Diffstat (limited to 'src/executor.rs')
-rw-r--r-- | src/executor.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/executor.rs b/src/executor.rs index 15704c2..eccab39 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -89,7 +89,7 @@ impl Executor { arg_filter: &Option<String>, ) -> Result<String, String> { if let Some(filter) = arg_filter { - return Ok(BarbFilter::new(None, filter.to_string()).apply(&body)?); + return Ok(BarbFilter::from_path(filter.to_string()).apply(&body)?); } else if bfile.filters().len() > 0 { let mut end_body: String = body.clone(); for filter in bfile.filters().iter() { @@ -144,11 +144,7 @@ impl Executor { } output.end_resp_hdr(); - output.body(self.apply_filters( - &bfile, - response.into_string().unwrap(), - filter, - )?); + output.body(self.apply_filters(&bfile, response.into_string().unwrap(), filter)?); Ok(()) } |