Skip to content

Commit

Permalink
Record all doc pin related user actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sauls8t committed Feb 4, 2020
1 parent c689379 commit fbd4b17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions domain/document/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fbd4b17

Please sign in to comment.