From 2b866db08bd20985a570c4f0f292aaecfe1ea052 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 15 Apr 2021 00:32:28 +0300 Subject: Add template support We are now serving static HTML alongside Gradecoin REST --- src/routes.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/routes.rs') diff --git a/src/routes.rs b/src/routes.rs index 280de35..f8d9605 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -7,7 +7,10 @@ use crate::schema::Db; /// Every route combined pub fn consensus_routes(db: Db) -> impl Filter + Clone { - transaction_list(db.clone()) + let welcome_route = warp::path::end().and_then(handlers::welcome_handler); + + welcome_route + .or(transaction_list(db.clone())) .or(register_user(db.clone())) .or(auth_transaction_propose(db.clone())) .or(auth_block_propose(db.clone())) @@ -60,4 +63,3 @@ pub fn auth_block_propose(db: Db) -> impl Filter