mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
event logging
This commit is contained in:
parent
b6c676149a
commit
93ed361705
48 changed files with 861 additions and 853 deletions
|
@ -169,6 +169,8 @@ func SaveAsTemplate(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
p.RecordEvent(entity.EventTypeTemplateAdd)
|
||||
|
||||
// Commit and return new document template
|
||||
log.IfErr(tx.Commit())
|
||||
|
||||
|
@ -180,7 +182,6 @@ func SaveAsTemplate(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
d, err := json.Marshal(doc)
|
||||
|
||||
if err != nil {
|
||||
writeJSONMarshalError(w, method, "document", err)
|
||||
return
|
||||
|
@ -452,6 +453,8 @@ func StartDocumentFromSavedTemplate(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
}
|
||||
|
||||
p.RecordEvent(entity.EventTypeTemplateUse)
|
||||
|
||||
log.IfErr(tx.Commit())
|
||||
|
||||
newDocument, err := p.GetDocument(documentID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue