From 16ffffa440d4ea654cbdfa01931b5a3b1788f8e6 Mon Sep 17 00:00:00 2001 From: lantry-glitch <allan.kwek.18@gmail.com> Date: Fri, 28 Mar 2025 15:56:51 +0700 Subject: [PATCH] Implement list_messages function in Notification service. --- src/service/notification.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/service/notification.rs b/src/service/notification.rs index f06db61..4ec10a1 100644 --- a/src/service/notification.rs +++ b/src/service/notification.rs @@ -91,11 +91,16 @@ impl NotificationService { )) } } - + pub fn receive_notification(payload: Notification) -> Result<Notification> { let subscriber_result: Notification = NotificationRepository::add(payload); return Ok(subscriber_result); } + + pub fn list_messages() -> Result<Vec<String>> { + return Ok(NotificationRepository::list_all_as_string()); + } + } -- GitLab