mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
event logging
This commit is contained in:
parent
b6c676149a
commit
93ed361705
48 changed files with 861 additions and 853 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue