From c03321bc059ed733970d8a696acb461428b1d284 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 10 Apr 2021 14:44:40 +0300 Subject: dunno --- src/routes.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/routes.rs') diff --git a/src/routes.rs b/src/routes.rs index 499ba35..b48fdb2 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -47,14 +47,10 @@ pub fn authenticated_transaction_propose( warp::path("transaction") .and(warp::path::end()) .and(warp::post()) - .and(custom_filters::transaction_json_body()) - .map(|t: Transaction| { - with_auth(db.clone(), t) - }) - .untuple_one() - .and(custom_filters::transaction_json_body()) - .and(custom_filters::with_db(db)) - .and_then(handlers::propose_authenticated_transaction) + .and(custom_filters::transaction_json_body()) // returns transaction + .and(custom_filters::transaction_header()) // returns Transaction + .and(custom_filters::with_db(db)) // wraps db + .and_then(handlers::propose_authenticated_transaction) // uses db, transaction and authenticated // .and(custom_filters::transaction_json_body()) // // TODO: you might have to restore this -- cgit v1.2.3-70-g09d2