Formatting & small fixes
This commit is contained in:
parent
951200724c
commit
0d7d36e971
17 changed files with 47 additions and 72 deletions
|
|
@ -11,7 +11,7 @@ use crate::app_state::database::models::VaultUpdateId;
|
|||
pub struct CreateDocumentVersion {
|
||||
pub relative_path: String,
|
||||
|
||||
// whether to merge with existing document at the same path if it exists
|
||||
// whether to merge with existing document at the same path if it already exists
|
||||
pub force_merge: Option<bool>,
|
||||
|
||||
#[ts(as = "Vec<u8>")]
|
||||
|
|
|
|||
|
|
@ -246,8 +246,6 @@ pub async fn merge_with_stored_version(
|
|||
content.clone()
|
||||
};
|
||||
|
||||
let is_different_from_request_content = merged_content != content;
|
||||
|
||||
// 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
|
||||
&& latest_version.relative_path != sanitized_relative_path
|
||||
|
|
@ -278,6 +276,8 @@ pub async fn merge_with_stored_version(
|
|||
.await
|
||||
.map_err(server_error)?;
|
||||
|
||||
let is_different_from_request_content = merged_content != content;
|
||||
|
||||
let new_version = StoredDocumentVersion {
|
||||
document_id: parent_document.document_id,
|
||||
vault_update_id: last_update_id + 1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue