From 8b3aa0335035ba47472ff482c52205f949f81c03 Mon Sep 17 00:00:00 2001 From: Ferdinand57 <ferdinandbs77@gmail.com> Date: Fri, 28 Mar 2025 20:38:01 +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 5071dde..8e59507 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; + } } \ No newline at end of file -- GitLab