mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 04:26:23 +08:00
fix: update octobase and fix type mismatching
This commit is contained in:
@@ -17,7 +17,7 @@ pub async fn get_doc<'s>(
|
||||
.lock()
|
||||
.await
|
||||
.doc_storage
|
||||
.get(parameters.id)
|
||||
.get(parameters.id.clone())
|
||||
.await
|
||||
.ok()
|
||||
{
|
||||
@@ -27,7 +27,7 @@ pub async fn get_doc<'s>(
|
||||
} else {
|
||||
Err(format!(
|
||||
"Failed to get yDoc from {}",
|
||||
parameters.id.to_string()
|
||||
parameters.id
|
||||
))
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ pub async fn update_y_document<'s>(
|
||||
.lock()
|
||||
.await
|
||||
.doc_storage
|
||||
.write_update(parameters.id, ¶meters.update)
|
||||
.write_update(parameters.id.clone(), ¶meters.update)
|
||||
.await
|
||||
.ok()
|
||||
{
|
||||
@@ -50,7 +50,7 @@ pub async fn update_y_document<'s>(
|
||||
} else {
|
||||
Err(format!(
|
||||
"Failed to update yDoc to {}",
|
||||
parameters.id.to_string()
|
||||
parameters.id
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ pub async fn create_workspace<'s>(
|
||||
.await
|
||||
{
|
||||
Ok(new_workspace) => {
|
||||
let workspace_doc = OctoBaseWorkspace::new(new_workspace.id.to_string());
|
||||
let workspace_doc = OctoBaseWorkspace::new(new_workspace.id.clone());
|
||||
|
||||
workspace_doc.with_trx(|mut workspace_doc_transaction| {
|
||||
workspace_doc_transaction.set_metadata(
|
||||
@@ -32,13 +32,13 @@ pub async fn create_workspace<'s>(
|
||||
.lock()
|
||||
.await
|
||||
.doc_storage
|
||||
.write_doc(new_workspace.id, workspace_doc.doc())
|
||||
.write_doc(new_workspace.id.clone(), workspace_doc.doc())
|
||||
.await
|
||||
{
|
||||
Err(error_message.to_string())
|
||||
} else {
|
||||
Ok(CreateWorkspaceResult {
|
||||
id: new_workspace.id.to_string(),
|
||||
id: new_workspace.id.clone(),
|
||||
name: parameters.name,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user