This commit is contained in:
2025-12-04 13:17:31 +01:00
parent e8f578eb48
commit 0a67d88ff2
+2 -8
View File
@@ -178,7 +178,6 @@ struct DocumentUpdateChangeset {
struct DocumentUpdatePlan {
changeset: DocumentUpdateChangeset,
title_changed: bool,
}
#[derive(Deserialize, ToSchema)]
@@ -273,7 +272,6 @@ impl<'a> DocumentsService<'a> {
let mut changes = DocumentUpdateChangeset::default();
let mut has_changes = false;
let mut title_changed = false;
if let Some(ref candidate) = title {
let trimmed = candidate.trim();
@@ -288,7 +286,6 @@ impl<'a> DocumentsService<'a> {
changes.filename = Some(new_filename);
}
has_changes = true;
title_changed = true;
}
}
@@ -336,7 +333,6 @@ impl<'a> DocumentsService<'a> {
Ok(DocumentUpdatePlan {
changeset: changes,
title_changed,
})
}
@@ -1184,10 +1180,8 @@ impl<'a> DocumentsService<'a> {
let payload_obj = payload
.as_object()
.ok_or_else(|| AppError::bad_request("request body must be a JSON object"))?;
let DocumentUpdatePlan {
mut changeset,
title_changed,
} = Self::build_document_update_plan(&document, payload_obj)?;
let DocumentUpdatePlan { mut changeset } =
Self::build_document_update_plan(&document, payload_obj)?;
let now = Utc::now().naive_utc();
changeset.updated_at = Some(now);