AppFlowy/rust-lib/flowy-workspace/src/module.rs

12 lines
358 B
Rust
Raw Normal View History

2021-07-14 00:07:25 +00:00
use flowy_dispatch::prelude::*;
use crate::{event::WorkspaceEvent, handlers::create_workspace, services::WorkspaceController};
use std::sync::Arc;
pub fn create(controller: Arc<WorkspaceController>) -> Module {
Module::new()
.name("Flowy-Workspace")
.data(controller)
.event(WorkspaceEvent::CreateWorkspace, create_workspace)
}