Use new API
This commit is contained in:
parent
44cb7a5b7c
commit
752efd7a27
2 changed files with 2 additions and 6 deletions
|
|
@ -78,9 +78,7 @@ pub async fn create_document(
|
||||||
&[], // the empty string is the first common parent of the two documents,
|
&[], // the empty string is the first common parent of the two documents,
|
||||||
&existing_version.content,
|
&existing_version.content,
|
||||||
&content_bytes,
|
&content_bytes,
|
||||||
)
|
);
|
||||||
.context("Failed to decode bytes as UTF-8")
|
|
||||||
.map_err(client_error)?;
|
|
||||||
|
|
||||||
StoredDocumentVersion {
|
StoredDocumentVersion {
|
||||||
vault_id,
|
vault_id,
|
||||||
|
|
|
||||||
|
|
@ -103,9 +103,7 @@ pub async fn update_document(
|
||||||
&parent_document.content,
|
&parent_document.content,
|
||||||
&latest_version.content,
|
&latest_version.content,
|
||||||
&content_bytes,
|
&content_bytes,
|
||||||
)
|
);
|
||||||
.context("Failed to decode bytes as UTF-8")
|
|
||||||
.map_err(client_error)?;
|
|
||||||
|
|
||||||
// We can only update the relative path if we're the first one to do so
|
// We can only update the relative path if we're the first one to do so
|
||||||
let new_relative_path = if parent_document.relative_path == latest_version.relative_path {
|
let new_relative_path = if parent_document.relative_path == latest_version.relative_path {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue