From 845fe2ef36b8160d03fdec70505a757e3ce6be8e Mon Sep 17 00:00:00 2001
From: Christian Raphael Heryanto <christian.raphael@ui.ac.id>
Date: Fri, 28 Mar 2025 16:30:44 +0800
Subject: [PATCH] Implement list_messages 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 eb68b4d..ae2845b 100644
--- a/src/service/notification.rs
+++ b/src/service/notification.rs
@@ -98,4 +98,8 @@ impl NotificationService {
         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