diff options
author | Adam Carpenter <adam.carpenter@adp.com> | 2021-12-10 14:15:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 14:15:06 -0500 |
commit | d3e1b697fec543e0197f1c549164c210504dde3b (patch) | |
tree | e10ec339108a8f8dbd2dd0f4737d580a0fc26ac1 /angelsharkd/src/routes/extensions/mod.rs | |
parent | 3eb745f153873d537bdc788170fc878543e7899e (diff) | |
parent | f98a1fa3035fb4834441ead1cce6710739312e14 (diff) | |
download | altruistic-angelshark-d3e1b697fec543e0197f1c549164c210504dde3b.tar.xz altruistic-angelshark-d3e1b697fec543e0197f1c549164c210504dde3b.zip |
Merge pull request #6 from adpllc/extensions/simple_deprov
Simple Deprov Extension
Diffstat (limited to 'angelsharkd/src/routes/extensions/mod.rs')
-rw-r--r-- | angelsharkd/src/routes/extensions/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/angelsharkd/src/routes/extensions/mod.rs b/angelsharkd/src/routes/extensions/mod.rs index cada47f..54053af 100644 --- a/angelsharkd/src/routes/extensions/mod.rs +++ b/angelsharkd/src/routes/extensions/mod.rs @@ -8,7 +8,7 @@ mod simple_search; /// The extension filter; consists of all compiled optional Angelshark extension /// filters combined under `/extensions`. -pub fn filter(_config: &Config) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { +pub fn filter(config: &Config) -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { // Note: this next line deals with the common edge case of having no // extensions loaded with feature flags. It ensures that the the type // checking is right when the return `.and()` is called below. @@ -17,14 +17,14 @@ pub fn filter(_config: &Config) -> impl Filter<Extract = impl Reply, Error = Rej // Block to enable simple_search extension feature. Instantiates a // searchable haystack and configures filters to handle search requests. #[cfg(feature = "simple_search")] - let haystack = simple_search::Haystack::new(_config.runner.clone()); + let haystack = simple_search::Haystack::new(config.runner.clone()); #[cfg(feature = "simple_search")] let filters = filters .or(simple_search::search_filter(haystack.clone())) .or(simple_search::refresh_filter(haystack)); #[cfg(feature = "simple_deprov")] - let filters = filters.or(simple_deprov::filter()); + let filters = filters.or(simple_deprov::filter(config.runner.clone())); path("extensions").and(filters) } |