diff --git a/src/controller/mod.rs b/src/controller/mod.rs index b511e7728fb221d6569cef381e67591ab196459b..002cadc094118eae02e0b37121e84465764908ef 100644 --- a/src/controller/mod.rs +++ b/src/controller/mod.rs @@ -1,3 +1,4 @@ +pub mod notification; use rocket::fairing::AdHoc; pub fn route_stage() -> AdHoc { diff --git a/src/controller/notification.rs b/src/controller/notification.rs new file mode 100644 index 0000000000000000000000000000000000000000..b189ea179c7155a7a608e8073ce2c48d3817c7e4 --- /dev/null +++ b/src/controller/notification.rs @@ -0,0 +1,6 @@ +use rocket::serde::json::Json; + +use bambangshop_receiver::Result; +use crate::model::notification::Notification; +use crate::model::subscriber::SubscriberRequest; +use crate::service::notification::NotificationService; diff --git a/src/service/mod.rs b/src/service/mod.rs index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..10cdf5de42d50b7930b9b9a137be3a871588e476 100644 --- a/src/service/mod.rs +++ b/src/service/mod.rs @@ -0,0 +1 @@ +pub mod notification; diff --git a/src/service/notification.rs b/src/service/notification.rs new file mode 100644 index 0000000000000000000000000000000000000000..e942eb07e48fd3c96dbf431214db763fb5d3ecc0 --- /dev/null +++ b/src/service/notification.rs @@ -0,0 +1,16 @@ +use std::thread; + +use rocket::http::Status; +use rocket::log; +use rocket::serde::json::to_string; +use rocket::tokio; + +use bambangshop_receiver::{APP_CONFIG, REQWEST_CLIENT, Result, compose_error_response}; +use crate::model::notification::Notification; +use crate::model::subscriber::SubscriberRequest; +use crate::repository::notification::NotificationRepository; + +pub struct NotificationService; + +impl NotificationService { +}