From d776d15af0351e2f22bca61b9371e92504548e2f Mon Sep 17 00:00:00 2001 From: noQils <daffaaqilmahmud@gmail.com> Date: Thu, 27 Mar 2025 15:38:42 +0700 Subject: [PATCH] Implement add function in Notification 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 44d2e54..f211c7a 100644 --- a/src/repository/notification.rs +++ b/src/repository/notification.rs @@ -12,5 +12,10 @@ 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