From a3bc90d6755acbe3670dfcf23f35acdaf9b00ffc Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Sat, 10 Apr 2021 15:49:26 +0300 Subject: %(date +'%Y%m%d') --- src/routes.rs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'src/routes.rs') diff --git a/src/routes.rs b/src/routes.rs index e2e068a..871fd9c 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -44,28 +44,24 @@ pub fn transaction_propose(db: Db) -> impl Filter impl Filter + Clone { + // // TODO: you might have to restore this + // // what we're trying to do is knowing which public key to use to decode the jwt in the + // // header of the request, we will either request it through a header (ugly, ugh) or get it + // // from json (then how do we chain these ugh) or we can just validate/check (move the + // // header/jwt logic to propose_transaction but that doesn't feel right either + // // good luck <10-04-21, yigit> // + warp::path("transaction") .and(warp::path::end()) .and(warp::post()) .and(custom_filters::transaction_json_body()) // returns transaction .map(|t: Transaction| { + // what do these do? with_auth(db.clone(), t) }) .and(custom_filters::transaction_json_body()) // 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 - // // what we're trying to do is knowing which public key to use to decode the jwt in the - // // header of the request, we will either request it through a header (ugly, ugh) or get it - // // from json (then how do we chain these ugh) or we can just validate/check (move the - // // header/jwt logic to propose_transaction but that doesn't feel right either - // // good luck <10-04-21, yigit> // - // .map(|t: Transaction| with_auth(db.clone(), t)) - // .and(custom_filters::transaction_json_body()) - // .and(custom_filters::with_db(db)) - // .and_then(handlers::propose_transaction) } /// POST /block warp route -- cgit v1.2.3-70-g09d2