diff options
author | Carpenter, Adam (CORP) <adam.carpenter@adp.com> | 2021-11-26 14:32:11 -0500 |
---|---|---|
committer | Carpenter, Adam (CORP) <adam.carpenter@adp.com> | 2021-11-26 14:32:11 -0500 |
commit | 75ef35829dc57d5b6f04a0c59160fe7584324793 (patch) | |
tree | b3a8dc76c907df228634daa604631717ea64ce29 /angelsharkd/src/routes/extensions/simple_search.rs | |
parent | 03af9488f7d7fea69c779b1d9263f34841dfad37 (diff) | |
download | altruistic-angelshark-75ef35829dc57d5b6f04a0c59160fe7584324793.tar.xz altruistic-angelshark-75ef35829dc57d5b6f04a0c59160fe7584324793.zip |
feat: basic extension loader module and two scaffolded, unimplemented extensions
Diffstat (limited to 'angelsharkd/src/routes/extensions/simple_search.rs')
-rw-r--r-- | angelsharkd/src/routes/extensions/simple_search.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/angelsharkd/src/routes/extensions/simple_search.rs b/angelsharkd/src/routes/extensions/simple_search.rs new file mode 100644 index 0000000..454dba3 --- /dev/null +++ b/angelsharkd/src/routes/extensions/simple_search.rs @@ -0,0 +1,14 @@ +use crate::config::Config; +use std::convert::Infallible; +use warp::{path, post, Filter, Rejection, Reply}; + +const CMD_LIST_EXT: &str = "list extension-type"; +const CMD_LIST_STAT: &str = "list station"; + +pub fn filter() -> impl Filter<Extract = impl Reply, Error = Rejection> + Clone { + path("search").and(post()).and_then(handle_simple_search) +} + +async fn handle_simple_search() -> Result<impl Reply, Infallible> { + Ok("Search!") +} |