From fbd4b17c15630e71550264277860df8885938650 Mon Sep 17 00:00:00 2001 From: sauls8t Date: Tue, 4 Feb 2020 14:36:11 +0000 Subject: [PATCH] Record all doc pin related user actions --- domain/document/endpoint.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/domain/document/endpoint.go b/domain/document/endpoint.go index 94380957..a9937bcf 100644 --- a/domain/document/endpoint.go +++ b/domain/document/endpoint.go @@ -1070,6 +1070,8 @@ func (h *Handler) Pin(w http.ResponseWriter, r *http.Request) { h.Runtime.Commit(ctx.Transaction) + h.Store.Audit.Record(ctx, audit.EventTypeDocPinAdd) + response.WriteEmpty(w) } @@ -1122,6 +1124,8 @@ func (h *Handler) Unpin(w http.ResponseWriter, r *http.Request) { h.Runtime.Commit(ctx.Transaction) + h.Store.Audit.Record(ctx, audit.EventTypeDocPinRemove) + response.WriteEmpty(w) } @@ -1222,6 +1226,8 @@ func (h *Handler) PinMove(w http.ResponseWriter, r *http.Request) { SourceType: activity.SourceTypeDocument, ActivityType: activity.TypePinSequence}) + h.Store.Audit.Record(ctx, audit.EventTypeDocPinChange) + h.Runtime.Commit(ctx.Transaction) response.WriteEmpty(w)