mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-26 18:39:52 +00:00
24 lines
563 B
Rust
24 lines
563 B
Rust
![]() |
use std::sync::Arc;
|
||
|
|
||
|
use flowy_user::event_map::UserAuthService;
|
||
|
|
||
|
use crate::self_host::configuration::SelfHostedConfiguration;
|
||
|
use crate::self_host::SelfHostedUserAuthServiceImpl;
|
||
|
use crate::AppFlowyServer;
|
||
|
|
||
|
pub struct SelfHostServer {
|
||
|
pub(crate) config: SelfHostedConfiguration,
|
||
|
}
|
||
|
|
||
|
impl SelfHostServer {
|
||
|
pub fn new(config: SelfHostedConfiguration) -> Self {
|
||
|
Self { config }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl AppFlowyServer for SelfHostServer {
|
||
|
fn user_service(&self) -> Arc<dyn UserAuthService> {
|
||
|
Arc::new(SelfHostedUserAuthServiceImpl::new(self.config.clone()))
|
||
|
}
|
||
|
}
|