From 14f7fa43f32b7d6345676755f2b2341178649f6d Mon Sep 17 00:00:00 2001
From: TheoKevH <theodorekevinh@gmail.com>
Date: Fri, 28 Mar 2025 20:26:45 +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 2933a6e..92a8ef8 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
-- 
GitLab