Support optional label with one doc

This commit is contained in:
shamoon
2026-08-18 13:25:16 -07:00
parent fb2a4d5db7
commit 46fdb11667
5 changed files with 103 additions and 8 deletions
@@ -374,10 +374,15 @@ export class DocumentService extends AbstractPaperlessService<Document> {
})
}
mergeDocumentsAsVersions(ids: number[], rootDocumentId: number) {
mergeDocumentsAsVersions(
ids: number[],
rootDocumentId: number,
versionLabel?: string
) {
return this.http.post(this.getResourceUrl(null, 'merge_as_versions'), {
documents: ids,
root_document_id: rootDocumentId,
...(versionLabel ? { version_label: versionLabel } : {}),
})
}