From 3ede4cd0b635b22e0b162979290e6e0e0ae885fb Mon Sep 17 00:00:00 2001 From: DawnFall19 <ignasius.michael09@gmail.com> Date: Fri, 28 Mar 2025 18:28:25 +0700 Subject: [PATCH] Implement receive_notification function in Notification service. --- src/service/notification.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/service/notification.rs b/src/service/notification.rs index 2d910ef..15eddc3 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 receiver_notification(payload: Notification) -> Result<Notification> { + let subscriber_result: Notification = NotificationRepository::add(payload); + return Ok(subscriber_result); + } } \ No newline at end of file -- GitLab