From 4f02e577984da089ed47973ed01c31c23e74cb71 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 9 Apr 2021 14:46:24 +0300 Subject: Remove unused code from routes Original repo here: https://github.com/blurbyte/restful-rust --- src/routes.rs | 63 ++++------------------------------------------------------- 1 file changed, 4 insertions(+), 59 deletions(-) (limited to 'src/routes.rs') diff --git a/src/routes.rs b/src/routes.rs index 9054fb6..f67c3b0 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -12,7 +12,7 @@ pub fn consensus_routes(db: Db) -> impl Filter impl Filter + Clone { warp::path!("transaction") .and(warp::get()) @@ -20,7 +20,7 @@ pub fn transaction_list(db: Db) -> impl Filter impl Filter + Clone { warp::path!("block") .and(warp::get()) @@ -28,7 +28,7 @@ pub fn block_list(db: Db) -> impl Filter impl Filter + Clone { warp::path!("transaction") .and(warp::post()) @@ -37,7 +37,7 @@ pub fn transaction_propose(db: Db) -> impl Filter impl Filter + Clone { warp::path!("block") .and(warp::post()) @@ -46,61 +46,6 @@ pub fn block_propose(db: Db) -> impl Filter impl Filter + Clone { -// games_list(db.clone()) -// .or(games_create(db.clone())) -// .or(games_update(db.clone())) -// .or(games_delete(db)) -//} - -//// `GET /games?offset=3&limit=5` -//pub fn games_list(db: Db) -> impl Filter + Clone { -// warp::path!("games") -// .and(warp::get()) -// .and(custom_filters::list_options()) -// .and(custom_filters::with_db(db)) -// .and_then(handlers::list_games) -//} - -//// `POST /games` -//pub fn games_create(db: Db) -> impl Filter + Clone { -// warp::path!("games") -// .and(warp::post()) -// .and(custom_filters::json_body()) -// .and(custom_filters::with_db(db)) -// .and_then(handlers::create_game) -//} - -//// `PUT /games/:id` -//pub fn games_update(db: Db) -> impl Filter + Clone { -// warp::path!("games" / u64) -// .and(warp::put()) -// .and(custom_filters::json_body()) -// .and(custom_filters::with_db(db)) -// .and_then(handlers::update_game) -//} - -//// `DELETE /games/:id` -//pub fn games_delete(db: Db) -> impl Filter + Clone { -// warp::path!("games" / u64) -// .and(warp::delete()) -// .and(custom_filters::with_db(db)) -// .and_then(handlers::delete_game) -//} - -//////////////////////////////// -//// tests below, it's fine // -//////////////////////////////// - -///////////////////////////////////// -// of course I'll write tests... // -///////////////////////////////////// - // TODO: write tests <07-04-21, yigit> // //#[cfg(test)] -- cgit v1.2.3-70-g09d2