aboutsummaryrefslogtreecommitdiff
path: root/src/bin/server.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-11-16 15:32:44 +0000
committerAkshay <[email protected]>2020-11-16 15:32:44 +0000
commit199f6bfd503901121b0cdf532a46de89b592ada0 (patch)
tree39f7f5ee38359fec26df641e40863153ba6aa346 /src/bin/server.rs
parentaf628595f3cc5c373502fc73acf579047aee5482 (diff)
add product deets and update endpoints
Diffstat (limited to 'src/bin/server.rs')
-rw-r--r--src/bin/server.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/server.rs b/src/bin/server.rs
index c28d041..180c5bc 100644
--- a/src/bin/server.rs
+++ b/src/bin/server.rs
@@ -42,7 +42,12 @@ async fn main() -> std::io::Result<()> {
42 ) 42 )
43 .service( 43 .service(
44 web::scope("/product") 44 web::scope("/product")
45 .route("/new", web::post().to(product::new_product)), 45 .route("/{id}", web::get().to(product::product_details))
46 .route("/new", web::post().to(product::new_product))
47 .route(
48 "/update_product/{id}",
49 web::post().to(product::update_product),
50 ),
46 ) 51 )
47 .route("/hey", web::get().to(manual_hello)) 52 .route("/hey", web::get().to(manual_hello))
48 }) 53 })