aboutsummaryrefslogtreecommitdiffstats
path: root/src/handlers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers.rs')
-rw-r--r--src/handlers.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/handlers.rs b/src/handlers.rs
index d2a834f..44c5299 100644
--- a/src/handlers.rs
+++ b/src/handlers.rs
@@ -352,6 +352,12 @@ pub async fn authenticate_user(
352 Ok(warp::reply::with_status(res_json, StatusCode::CREATED)) 352 Ok(warp::reply::with_status(res_json, StatusCode::CREATED))
353} 353}
354 354
355/// GET /config
356/// Returns the configuration settings of this network in JSON.
357pub async fn get_config(db: Db) -> Result<impl warp::Reply, Infallible> {
358 Ok(reply::with_status(reply::json(&db.config), StatusCode::OK))
359}
360
355/// GET /transaction 361/// GET /transaction
356/// Returns JSON array of transactions 362/// Returns JSON array of transactions
357pub async fn list_transactions(db: Db) -> Result<impl warp::Reply, Infallible> { 363pub async fn list_transactions(db: Db) -> Result<impl warp::Reply, Infallible> {