From f282f126a67b4825f5124478ff326518bf64c9e6 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Fri, 13 Oct 2023 10:50:20 -0300 Subject: [PATCH] feat: have test unswer code --- src/main.rs | 1 + src/test.rs | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 src/test.rs diff --git a/src/main.rs b/src/main.rs index 5373fe8..b484c3c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -131,6 +131,7 @@ async fn main() -> std::io::Result<()> { .wrap(Logger::default()) .app_data(web::Data::new(state.clone())) .route("/", web::post().to(connect_handler)) + .route("/test", web::post().to(test_handler)) }) .bind("0.0.0.0:8080")? .run() diff --git a/src/test.rs b/src/test.rs new file mode 100644 index 0000000..bb541d6 --- /dev/null +++ b/src/test.rs @@ -0,0 +1,3 @@ +async fn test_handler() -> Result { + Ok(HttpResponse::Ok().body("Hello, World!")) +} \ No newline at end of file