mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: check workspace id before write to disk (#5197)
* chore: check workspace id before write to disk * chore: update logs * chore: update logs * chore: update ci * chore: bump client api
This commit is contained in:
@ -3,7 +3,7 @@ use client_api::entity::QueryCollabResult::{Failed, Success};
|
||||
use client_api::entity::{QueryCollab, QueryCollabParams};
|
||||
use client_api::error::ErrorCode::RecordNotFound;
|
||||
use collab::core::collab::DataSource;
|
||||
use collab::core::collab_plugin::EncodedCollab;
|
||||
use collab::entity::EncodedCollab;
|
||||
use collab_entity::CollabType;
|
||||
use tracing::error;
|
||||
|
||||
@ -36,7 +36,7 @@ where
|
||||
},
|
||||
};
|
||||
match try_get_client?.get_collab(params).await {
|
||||
Ok(data) => Ok(Some(data.doc_state.to_vec())),
|
||||
Ok(data) => Ok(Some(data.encode_collab.doc_state.to_vec())),
|
||||
Err(err) => {
|
||||
if err.code == RecordNotFound {
|
||||
Ok(None)
|
||||
|
@ -37,6 +37,7 @@ where
|
||||
.get_collab(params)
|
||||
.await
|
||||
.map_err(FlowyError::from)?
|
||||
.encode_collab
|
||||
.doc_state
|
||||
.to_vec();
|
||||
Ok(doc_state)
|
||||
@ -72,6 +73,7 @@ where
|
||||
.get_collab(params)
|
||||
.await
|
||||
.map_err(FlowyError::from)?
|
||||
.encode_collab
|
||||
.doc_state
|
||||
.to_vec();
|
||||
let document = Document::from_doc_state(
|
||||
|
@ -94,6 +94,7 @@ where
|
||||
.get_collab(params)
|
||||
.await
|
||||
.map_err(FlowyError::from)?
|
||||
.encode_collab
|
||||
.doc_state
|
||||
.to_vec();
|
||||
let folder = Folder::from_collab_doc_state(
|
||||
@ -137,6 +138,7 @@ where
|
||||
.get_collab(params)
|
||||
.await
|
||||
.map_err(FlowyError::from)?
|
||||
.encode_collab
|
||||
.doc_state
|
||||
.to_vec();
|
||||
Ok(doc_state)
|
||||
|
@ -334,7 +334,7 @@ where
|
||||
};
|
||||
|
||||
let resp = try_get_client?.get_collab(params).await?;
|
||||
Ok(resp.doc_state.to_vec())
|
||||
Ok(resp.encode_collab.doc_state.to_vec())
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user