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

event logging

This commit is contained in:
Harvey Kandola 2017-05-04 12:31:52 +01:00
parent b6c676149a
commit 93ed361705
48 changed files with 861 additions and 853 deletions

View file

@ -234,6 +234,8 @@ func AddBlock(w http.ResponseWriter, r *http.Request) {
return
}
p.RecordEvent(entity.EventTypeBlockAdd)
log.IfErr(tx.Commit())
b, err = p.GetBlock(b.RefID)
@ -363,6 +365,8 @@ func UpdateBlock(w http.ResponseWriter, r *http.Request) {
return
}
p.RecordEvent(entity.EventTypeBlockUpdate)
log.IfErr(tx.Commit())
writeSuccessEmptyJSON(w)
@ -403,6 +407,8 @@ func DeleteBlock(w http.ResponseWriter, r *http.Request) {
return
}
p.RecordEvent(entity.EventTypeBlockDelete)
log.IfErr(tx.Commit())
writeSuccessEmptyJSON(w)