Adds content column to documents and revisions as JSON snapshot (#6179)
This commit is contained in:
@@ -684,12 +684,11 @@ router.post(
|
||||
// restore a document to a specific revision
|
||||
authorize(user, "update", document);
|
||||
const revision = await Revision.findByPk(revisionId);
|
||||
|
||||
authorize(document, "restore", revision);
|
||||
|
||||
document.text = revision.text;
|
||||
document.title = revision.title;
|
||||
document.restoreFromRevision(revision);
|
||||
await document.save();
|
||||
|
||||
await Event.create({
|
||||
name: "documents.restore",
|
||||
documentId: document.id,
|
||||
|
||||
Reference in New Issue
Block a user