From 3a9502e39143b5a95b5f8c084dfa4d3b1e6294b7 Mon Sep 17 00:00:00 2001
From: Andrew4Coding <andrewdevitoaryo@gmail.com>
Date: Fri, 28 Mar 2025 12:09:23 +0800
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 3a1393e..202f9ca 100644
--- a/src/repository/notification.rs
+++ b/src/repository/notification.rs
@@ -16,4 +16,9 @@ impl NotificationRepository {
 
         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