Skip to content

Commit

Permalink
add API method to erase a revision #4662
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Mar 3, 2024
1 parent 9565b0b commit 0ad337c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/becca/entities/brevision.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ class BRevision extends AbstractBeccaEntity {
return this.getAttachments().filter(attachment => attachment.title === title)[0];
}

/**
* Revisions are not soft-deletable, they are immediately hard-deleted (erased).
*/
eraseRevision() {
require("../../services/erase.js").eraseRevisions([this.revisionId]);
}

beforeSaving() {
super.beforeSaving();

Expand Down

0 comments on commit 0ad337c

Please sign in to comment.