From 77b18f311ca45c66c9538eb8311b7f4d64a7c426 Mon Sep 17 00:00:00 2001
From: Christian Raphael Heryanto <christian.raphael@ui.ac.id>
Date: Fri, 28 Mar 2025 14:57:22 +0800
Subject: [PATCH] Implement add function in Subscriber repository.

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

diff --git a/src/repository/notification.rs b/src/repository/notification.rs
index 8231324..cde012e 100644
--- a/src/repository/notification.rs
+++ b/src/repository/notification.rs
@@ -11,4 +11,9 @@ lazy_static! {
 
 pub struct NotificationRepository;
 
-impl NotificationRepository {}
+impl NotificationRepository {
+    pub fn add(notification: Notification) -> Notification {
+        NOTIFICATIONS.write().unwrap().push(notification.clone());
+        return notification;
+    }
+}
-- 
GitLab