From c50e61710894bf1dd4304b74a8689f1a6a2c039c Mon Sep 17 00:00:00 2001
From: TheoKevH <theodorekevinh@gmail.com>
Date: Fri, 28 Mar 2025 20:17:04 +0700
Subject: [PATCH] Implement list_all_as_string function in Subscriber
 repository

---
 src/repository/notification.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/repository/notification.rs b/src/repository/notification.rs
index 69d6ea9..91a98d1 100644
--- a/src/repository/notification.rs
+++ b/src/repository/notification.rs
@@ -17,4 +17,9 @@ impl NotificationRepository {
             .push(notification.clone());
         return notification;
     }
+
+    pub fn list_all_as_string() -> Vec<String> {
+        return NOTIFICATIONS.read().unwrap()
+            .iter().map(|f| format!("{}", f.clone())).collect();
+    }
 }
\ No newline at end of file
-- 
GitLab