diff options
author | Yigit Sever | 2021-04-10 14:44:40 +0300 |
---|---|---|
committer | Yigit Sever | 2021-04-10 14:44:40 +0300 |
commit | c03321bc059ed733970d8a696acb461428b1d284 (patch) | |
tree | a79e48c3a55ac1957932a9b80ce25b39088a9253 /src/routes.rs | |
parent | ed53fbc9097370feeda1c5507878933643a9bcc5 (diff) | |
download | gradecoin-c03321bc059ed733970d8a696acb461428b1d284.tar.gz gradecoin-c03321bc059ed733970d8a696acb461428b1d284.tar.bz2 gradecoin-c03321bc059ed733970d8a696acb461428b1d284.zip |
dunno
Diffstat (limited to 'src/routes.rs')
-rw-r--r-- | src/routes.rs | 12 |
1 files changed, 4 insertions, 8 deletions
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( | |||
47 | warp::path("transaction") | 47 | warp::path("transaction") |
48 | .and(warp::path::end()) | 48 | .and(warp::path::end()) |
49 | .and(warp::post()) | 49 | .and(warp::post()) |
50 | .and(custom_filters::transaction_json_body()) | 50 | .and(custom_filters::transaction_json_body()) // returns transaction |
51 | .map(|t: Transaction| { | 51 | .and(custom_filters::transaction_header()) // returns Transaction |
52 | with_auth(db.clone(), t) | 52 | .and(custom_filters::with_db(db)) // wraps db |
53 | }) | 53 | .and_then(handlers::propose_authenticated_transaction) // uses db, transaction and authenticated |
54 | .untuple_one() | ||
55 | .and(custom_filters::transaction_json_body()) | ||
56 | .and(custom_filters::with_db(db)) | ||
57 | .and_then(handlers::propose_authenticated_transaction) | ||
58 | 54 | ||
59 | // .and(custom_filters::transaction_json_body()) | 55 | // .and(custom_filters::transaction_json_body()) |
60 | // // TODO: you might have to restore this | 56 | // // TODO: you might have to restore this |