mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: leave workspace api (#4942)
* feat: leave workpspace event * feat: add leave workspace event --------- Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
@ -346,6 +346,16 @@ where
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
|
||||
fn leave_workspace(&self, workspace_id: &str) -> FutureResult<(), FlowyError> {
|
||||
let try_get_client = self.server.try_get_client();
|
||||
let workspace_id = workspace_id.to_string();
|
||||
FutureResult::new(async move {
|
||||
let client = try_get_client?;
|
||||
client.leave_workspace(&workspace_id).await?;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
async fn get_admin_client(client: &Arc<AFCloudClient>) -> FlowyResult<Client> {
|
||||
|
Reference in New Issue
Block a user