diff --git a/src/service/product.rs b/src/service/product.rs index 2137732bf14c2b6cd9501c6a2e0cfacfc6c3e456..1a662c406ab85a3d8f12502fed4b0a422837a3d3 100644 --- a/src/service/product.rs +++ b/src/service/product.rs @@ -43,10 +43,9 @@ impl ProductService { String::from("Product not found."), )); } - - NotificationService.notify(&product.product_type, "DELETED", product.clone()); let product: Product = product_opt.unwrap(); + NotificationService.notify(&product.product_type, "DELETED", product.clone()); return Ok(Json::from(product)); }