diff --git a/src/service/notification.rs b/src/service/notification.rs index 2933a6ebf01aad4fe4d05bf7720f864802973296..92a8ef8b13dc9bc0a06fc07f9ffa1f92004860db 100644 --- a/src/service/notification.rs +++ b/src/service/notification.rs @@ -90,4 +90,9 @@ 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