15 lines
420 B
Rust
Raw Normal View History

2021-07-08 21:23:44 +08:00
use flowy_dispatch::prelude::Module;
2021-07-09 23:31:44 +08:00
use flowy_user::prelude::user_session::{UserSession, UserSessionConfig};
use std::sync::Arc;
2021-06-30 23:11:27 +08:00
2021-07-09 23:31:44 +08:00
pub struct ModuleConfig {
pub root: String,
}
pub fn build_modules(config: ModuleConfig) -> Vec<Module> {
let user_config = UserSessionConfig::new(&config.root);
let user_session = Arc::new(UserSession::new(user_config));
vec![flowy_user::module::create(user_session)]
}