aboutsummaryrefslogtreecommitdiffstats
path: root/src/handlers.rs
diff options
context:
space:
mode:
authorYigit Sever2021-04-10 15:49:26 +0300
committerYigit Sever2021-04-10 15:49:26 +0300
commita3bc90d6755acbe3670dfcf23f35acdaf9b00ffc (patch)
tree28b354bac254c1c92e8a13b8b2bf6f3d0dcde021 /src/handlers.rs
parent38a928a47f94d9f456c9c53f5db4fcd19165e7ac (diff)
downloadgradecoin-a3bc90d6755acbe3670dfcf23f35acdaf9b00ffc.tar.gz
gradecoin-a3bc90d6755acbe3670dfcf23f35acdaf9b00ffc.tar.bz2
gradecoin-a3bc90d6755acbe3670dfcf23f35acdaf9b00ffc.zip
%(date +'%Y%m%d')
Diffstat (limited to 'src/handlers.rs')
-rw-r--r--src/handlers.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index 8908bfc..0bcbd49 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -3,6 +3,8 @@ use log::debug; // this is more useful than debug! learn how to use this
3use parking_lot::RwLockUpgradableReadGuard; 3use parking_lot::RwLockUpgradableReadGuard;
4use std::convert::Infallible; 4use std::convert::Infallible;
5use warp::{http::StatusCode, reply}; 5use warp::{http::StatusCode, reply};
6use warp::reject::Rejection;
7use crate::auth::Pubkey;
6 8
7use crate::schema::{Block, Db, Transaction}; 9use crate::schema::{Block, Db, Transaction};
8 10
@@ -61,7 +63,7 @@ pub async fn propose_transaction(
61/// POST /transaction, authenticated 63/// POST /transaction, authenticated
62/// The transaction arrived in this method has been authored by the public key in the source 64/// The transaction arrived in this method has been authored by the public key in the source
63pub async fn propose_authenticated_transaction( 65pub async fn propose_authenticated_transaction(
64 pubkey: String, 66 pubkey: Pubkey,
65 new_transaction: Transaction, 67 new_transaction: Transaction,
66 db: Db, 68 db: Db,
67) -> Result<impl warp::Reply, warp::Rejection> { 69) -> Result<impl warp::Reply, warp::Rejection> {