diff options
| author | Yigit Sever | 2021-04-10 15:49:26 +0300 |
|---|---|---|
| committer | Yigit Sever | 2021-04-10 15:49:26 +0300 |
| commit | a3bc90d6755acbe3670dfcf23f35acdaf9b00ffc (patch) | |
| tree | 28b354bac254c1c92e8a13b8b2bf6f3d0dcde021 /src/handlers.rs | |
| parent | 38a928a47f94d9f456c9c53f5db4fcd19165e7ac (diff) | |
| download | gradecoin-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.rs | 4 |
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 | |||
| 3 | use parking_lot::RwLockUpgradableReadGuard; | 3 | use parking_lot::RwLockUpgradableReadGuard; |
| 4 | use std::convert::Infallible; | 4 | use std::convert::Infallible; |
| 5 | use warp::{http::StatusCode, reply}; | 5 | use warp::{http::StatusCode, reply}; |
| 6 | use warp::reject::Rejection; | ||
| 7 | use crate::auth::Pubkey; | ||
| 6 | 8 | ||
| 7 | use crate::schema::{Block, Db, Transaction}; | 9 | use 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 |
| 63 | pub async fn propose_authenticated_transaction( | 65 | pub 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> { |
