Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit 0c925c8c authored by Scallss's avatar Scallss
Browse files

Implement receive_notification function in Notification service.

parent ffe2cd40
No related branches found
No related tags found
No related merge requests found
use std::ops::Not;
use std::thread; use std::thread;
use rocket::http::Status; use rocket::http::Status;
...@@ -91,4 +92,9 @@ impl NotificationService { ...@@ -91,4 +92,9 @@ impl NotificationService {
return thread::spawn(move || Self::unsubscribe_request(product_type_clone)).join().unwrap(); return thread::spawn(move || Self::unsubscribe_request(product_type_clone)).join().unwrap();
} }
pub fn receive_notification(payload: Notification) -> Result<Notification> {
let subcriber_result: Notification = NotificationRepository::add(payload);
return Ok(subcriber_result);
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment