From 93e1138a433a7faad04a977685014ae6707aa78f Mon Sep 17 00:00:00 2001 From: rafliesa <rflisaa@gmail.com> Date: Fri, 28 Mar 2025 19:21:04 +0700 Subject: [PATCH] Implement receive_notification function in Notification service. --- src/service/notification.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/service/notification.rs b/src/service/notification.rs index 91fe3c7..3a3d09e 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 -- GitLab