From 199f6bfd503901121b0cdf532a46de89b592ada0 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 16 Nov 2020 21:02:44 +0530 Subject: add product deets and update endpoints --- src/bin/server.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/bin') 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<()> { ) .service( web::scope("/product") - .route("/new", web::post().to(product::new_product)), + .route("/{id}", web::get().to(product::product_details)) + .route("/new", web::post().to(product::new_product)) + .route( + "/update_product/{id}", + web::post().to(product::update_product), + ), ) .route("/hey", web::get().to(manual_hello)) }) -- cgit v1.2.3