Merge branch 'feat/support-get-encoded-collab-event' of https://github.com/AppFlowy-IO/AppFlowy into feat/support-get-encoded-collab-event

This commit is contained in:
Lucas.Xu
2024-06-21 20:21:47 +08:00
3 changed files with 11 additions and 4 deletions

View File

@ -868,8 +868,8 @@ impl FolderManager {
Ok(())
}
/// The view will be published to the web with the specified view id.
/// The [publish_name] is the [view name] + [view id] when currently published
/// Publish the view with the given view id.
/// [publish_name] is one part of the URL of the published view. if it is None, the default publish name will be used. The default publish name is generated by the view id and view name.
#[tracing::instrument(level = "debug", skip(self), err)]
pub async fn publish_view(&self, view_id: &str, publish_name: Option<String>) -> FlowyResult<()> {
let view = self
@ -898,6 +898,7 @@ impl FolderManager {
Ok(())
}
/// Unpublish the view with the given view id.
#[tracing::instrument(level = "debug", skip(self), err)]
pub async fn unpublish_views(&self, view_ids: Vec<String>) -> FlowyResult<()> {
let workspace_id = self.user.workspace_id()?;
@ -908,12 +909,16 @@ impl FolderManager {
Ok(())
}
/// Get the publish info of the view with the given view id.
/// The publish info contains the namespace and publish_name of the view.
#[tracing::instrument(level = "debug", skip(self), err)]
pub async fn get_publish_info(&self, view_id: &str) -> FlowyResult<PublishInfoResponse> {
let publish_info = self.cloud_service.get_publish_info(view_id).await?;
Ok(publish_info)
}
/// Get the namespace of the current workspace.
/// The namespace is used to generate the URL of the published view.
#[tracing::instrument(level = "debug", skip(self), err)]
pub async fn set_publish_namespace(&self, namespace: String) -> FlowyResult<()> {
let workspace_id = self.user.workspace_id()?;
@ -924,6 +929,7 @@ impl FolderManager {
Ok(())
}
/// Get the namespace of the current workspace.
#[tracing::instrument(level = "debug", skip(self), err)]
pub async fn get_publish_namespace(&self) -> FlowyResult<String> {
let workspace_id = self.user.workspace_id()?;