aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/handlers.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index bfd57bc..4c3f469 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -97,6 +97,19 @@ pub async fn propose_transaction(
97) -> Result<impl warp::Reply, warp::Rejection> { 97) -> Result<impl warp::Reply, warp::Rejection> {
98 debug!("new transaction request {:?}", new_transaction); 98 debug!("new transaction request {:?}", new_transaction);
99 99
100 match db.users
101 .read()
102 .iter()
103 .find(|(uid, user)| user.public_key == new_transaction.target ||
104 user.public_key == new_transaction.source) {
105 Some((uid, user)) => {
106 // let token = auth::create_jwt()
107 }
108 None => {
109
110 }
111
112 }
100 // let mut transactions = db.lock().await; 113 // let mut transactions = db.lock().await;
101 let mut transactions = db.pending_transactions.write(); 114 let mut transactions = db.pending_transactions.write();
102 115