feat: have test unswer code

This commit is contained in:
Stepan Vladovskiy 2023-10-13 10:50:20 -03:00
parent 1019752215
commit f282f126a6
2 changed files with 4 additions and 0 deletions

View File

@ -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()

3
src/test.rs Normal file
View File

@ -0,0 +1,3 @@
async fn test_handler() -> Result<HttpResponse, actix_web::Error> {
Ok(HttpResponse::Ok().body("Hello, World!"))
}