From 2b552974445a225560b15e61f6dc8ccd7189deb1 Mon Sep 17 00:00:00 2001 From: vissutagunawan <vglim3653@gmail.com> Date: Thu, 27 Mar 2025 09:59:05 +0700 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 00a2bda..bbe087c 100644 --- a/src/repository/notification.rs +++ b/src/repository/notification.rs @@ -9,4 +9,9 @@ use lazy_static::lazy_static; pub struct NotificationRepository; - impl NotificationRepository {} \ No newline at end of file + impl NotificationRepository { + pub fn add(notification: Notification) -> Notification { + NOTIFICATIONS.write().unwrap().push(notification.clone()); + return notification; + } + } \ No newline at end of file -- GitLab