mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-02-11 23:59:31 -06:00
Refresh versions after delete
This commit is contained in:
@@ -197,13 +197,20 @@ export class DocumentService extends AbstractPaperlessService<Document> {
|
||||
if (label) {
|
||||
formData.append('label', label)
|
||||
}
|
||||
return this.http.post(
|
||||
return this.http.post<string>(
|
||||
this.getResourceUrl(documentId, 'update_version'),
|
||||
formData,
|
||||
{ reportProgress: true, observe: 'events' }
|
||||
formData
|
||||
)
|
||||
}
|
||||
|
||||
getVersions(documentId: number): Observable<Document> {
|
||||
return this.http.get<Document>(this.getResourceUrl(documentId), {
|
||||
params: {
|
||||
fields: 'id,versions',
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
deleteVersion(headDocumentId: number, versionId: number) {
|
||||
return this.http.delete<{ result: string; current_version_id: number }>(
|
||||
this.getResourceUrl(headDocumentId, `versions/${versionId}`)
|
||||
|
||||
Reference in New Issue
Block a user