From 5890a4a0c597d82e85b397165fd0d15d9f75de63 Mon Sep 17 00:00:00 2001
From: lantry-glitch <allan.kwek.18@gmail.com>
Date: Fri, 28 Mar 2025 15:22:04 +0700
Subject: [PATCH] Implement add 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 c3acb0e..b02221a 100644
--- a/src/repository/notification.rs
+++ b/src/repository/notification.rs
@@ -12,4 +12,9 @@ lazy_static! {
 pub struct NotificationRepository;
 
 impl NotificationRepository {
+    pub fn add(notification: Notification) -> Notification {
+        NOTIFICATIONS.write().unwrap()
+            .push(notification.clone());
+        return notification;
+    }    
 }
-- 
GitLab