diff --git a/src/service/notification.rs b/src/service/notification.rs index 755d085423f525c9b8dd5a3198e43f3758e72971..2e42203e4397aaf1313f00144c422747116b1375 100644 --- a/src/service/notification.rs +++ b/src/service/notification.rs @@ -1,3 +1,4 @@ +use std::ops::Not; use std::thread; use rocket::http::Status; @@ -91,4 +92,9 @@ impl NotificationService { return thread::spawn(move || Self::unsubscribe_request(product_type_clone)).join().unwrap(); } + + pub fn receive_notification(payload: Notification) -> Result<Notification> { + let subcriber_result: Notification = NotificationRepository::add(payload); + return Ok(subcriber_result); + } } \ No newline at end of file