From 5e82b9ed1f7f236d596500478588dd2f84231fef Mon Sep 17 00:00:00 2001 From: "Carpenter, Adam (CORP)" Date: Wed, 8 Dec 2021 15:29:59 -0500 Subject: feat: begin basic filter --- angelsharkd/src/routes/extensions/simple_deprov.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'angelsharkd/src/routes/extensions') diff --git a/angelsharkd/src/routes/extensions/simple_deprov.rs b/angelsharkd/src/routes/extensions/simple_deprov.rs index 2b5ad40..eeb27a0 100644 --- a/angelsharkd/src/routes/extensions/simple_deprov.rs +++ b/angelsharkd/src/routes/extensions/simple_deprov.rs @@ -1,5 +1,12 @@ -use warp::{Filter, Rejection, Reply}; +use warp::{ + body::{content_length_limit, json}, + post, Filter, Rejection, Reply, +}; pub fn filter() -> impl Filter + Clone { - warp::path("deprov").map(|| -> &str { todo!() }) // TODO: + warp::path("deprov") + .and(post()) + .and(content_length_limit(1024 * 16)) + .and(json()) + .map(|_: String| -> &str { todo!() }) // TODO: } -- cgit v1.2.3