init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
use crate::services::ServicesContext;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ServerOrderService {
|
||||
service_context: Arc<ServicesContext>,
|
||||
}
|
||||
|
||||
impl ServerOrderService {
|
||||
pub fn new(service_context: Arc<ServicesContext>) -> Self {
|
||||
Self { service_context }
|
||||
}
|
||||
|
||||
pub async fn exemple_call_other_service(&self) {
|
||||
if let Some(services) = self.service_context.services.get() {
|
||||
services.permission_sync.start_listen_event().await;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user