diff --git a/src/service/notification.rs b/src/service/notification.rs index 91fe3c737f34f4520fc37587de5b4464ca65f65f..3a3d09e0243131d17070990cd7c232f28bbf44ec 100644 --- a/src/service/notification.rs +++ b/src/service/notification.rs @@ -83,4 +83,8 @@ impl NotificationService{ return thread::spawn(move || Self::unsubscribe_request(product_type_clone)).join().unwrap(); } + pub fn receive_notification(payload: Notification) -> Result<Notification> { + let subscriber_result: Notification = NotificationRepository::add(payload); + return Ok(subscriber_result); + } } \ No newline at end of file