1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 22:59:43 +02:00

Provider foundation for doc lifecycle and versions

This commit is contained in:
Harvey Kandola 2018-03-14 13:38:37 +00:00
parent 4e32bffebe
commit 958f4d30b9
19 changed files with 918 additions and 782 deletions

View file

@ -249,7 +249,12 @@ func (h *Handler) Update(w http.ResponseWriter, r *http.Request) {
h.Store.Audit.Record(ctx, audit.EventTypeDocumentUpdate)
a, _ := h.Store.Attachment.GetAttachments(ctx, documentID)
go h.Indexer.IndexDocument(ctx, d, a)
if d.Lifecycle == workflow.LifecycleLive {
go h.Indexer.IndexDocument(ctx, d, a)
} else {
go h.Indexer.DeleteDocument(ctx, d.RefID)
}
response.WriteEmpty(w)
}