aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/server.rs6
-rw-r--r--src/handlers/mod.rs1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/server.rs b/src/bin/server.rs
index d074e4f..c28d041 100644
--- a/src/bin/server.rs
+++ b/src/bin/server.rs
@@ -5,7 +5,7 @@ use actix_web::{web, App, HttpServer};
5use diesel::r2d2::{ConnectionManager, Pool}; 5use diesel::r2d2::{ConnectionManager, Pool};
6use diesel::MysqlConnection; 6use diesel::MysqlConnection;
7use furby::handlers::smoke::manual_hello; 7use furby::handlers::smoke::manual_hello;
8use furby::handlers::users; 8use furby::handlers::{product, users};
9use rand::Rng; 9use rand::Rng;
10 10
11#[actix_web::main] 11#[actix_web::main]
@@ -40,6 +40,10 @@ async fn main() -> std::io::Result<()> {
40 web::post().to(users::change_password), 40 web::post().to(users::change_password),
41 ), 41 ),
42 ) 42 )
43 .service(
44 web::scope("/product")
45 .route("/new", web::post().to(product::new_product)),
46 )
43 .route("/hey", web::get().to(manual_hello)) 47 .route("/hey", web::get().to(manual_hello))
44 }) 48 })
45 .bind("127.0.0.1:7878")? 49 .bind("127.0.0.1:7878")?
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index 65d3519..41bba8d 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -1,2 +1,3 @@
1pub mod product;
1pub mod smoke; 2pub mod smoke;
2pub mod users; 3pub mod users;