mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Set doc revised for when section events
Supports new space recency filters.
This commit is contained in:
parent
eb9501014d
commit
e6e5f75ee7
2 changed files with 36 additions and 0 deletions
|
@ -175,6 +175,9 @@ func (h *Handler) Add(w http.ResponseWriter, r *http.Request) {
|
|||
ActivityType: activity.TypeCreated})
|
||||
}
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, doc.RefID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
h.Store.Audit.Record(ctx, audit.EventTypeSectionAdd)
|
||||
|
@ -492,6 +495,9 @@ func (h *Handler) Update(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, model.Page.DocumentID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
if doc.Lifecycle == workflow.LifecycleLive {
|
||||
|
@ -593,6 +599,9 @@ func (h *Handler) Delete(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
h.Store.Page.DeletePageRevisions(ctx, pageID)
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, doc.RefID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
h.Store.Audit.Record(ctx, audit.EventTypeSectionDelete)
|
||||
|
@ -702,6 +711,9 @@ func (h *Handler) DeletePages(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, doc.RefID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
h.Store.Audit.Record(ctx, audit.EventTypeSectionDelete)
|
||||
|
@ -779,6 +791,9 @@ func (h *Handler) ChangePageSequence(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, doc.RefID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
h.Store.Audit.Record(ctx, audit.EventTypeSectionResequence)
|
||||
|
@ -848,6 +863,9 @@ func (h *Handler) ChangePageLevel(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, doc.RefID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
h.Store.Audit.Record(ctx, audit.EventTypeSectionResequence)
|
||||
|
@ -969,6 +987,9 @@ func (h *Handler) Copy(w http.ResponseWriter, r *http.Request) {
|
|||
ActivityType: activity.TypeCreated})
|
||||
}
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, targetID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
h.Store.Audit.Record(ctx, audit.EventTypeSectionCopy)
|
||||
|
@ -1223,6 +1244,9 @@ func (h *Handler) Rollback(w http.ResponseWriter, r *http.Request) {
|
|||
ActivityType: activity.TypeReverted})
|
||||
}
|
||||
|
||||
// Update doc revised.
|
||||
h.Store.Document.UpdateRevised(ctx, doc.RefID)
|
||||
|
||||
ctx.Transaction.Commit()
|
||||
|
||||
h.Store.Audit.Record(ctx, audit.EventTypeSectionRollback)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue