mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
event logging
This commit is contained in:
parent
b6c676149a
commit
93ed361705
48 changed files with 861 additions and 853 deletions
|
@ -18,9 +18,11 @@ import (
|
|||
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/core/api/request"
|
||||
"github.com/documize/community/core/api/util"
|
||||
"github.com/documize/community/core/event"
|
||||
"github.com/documize/community/core/log"
|
||||
)
|
||||
|
||||
// GetSMTPConfig returns installation-wide SMTP settings
|
||||
|
@ -160,6 +162,15 @@ func SaveLicense(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
event.Handler().Publish(string(event.TypeSystemLicenseChange))
|
||||
|
||||
p.Context.Transaction, err = request.Db.Beginx()
|
||||
if err != nil {
|
||||
writeTransactionError(w, method, err)
|
||||
return
|
||||
}
|
||||
|
||||
p.RecordEvent(entity.EventTypeSystemLicense)
|
||||
log.IfErr(p.Context.Transaction.Commit())
|
||||
|
||||
util.WriteSuccessEmptyJSON(w)
|
||||
}
|
||||
|
||||
|
@ -227,6 +238,8 @@ func SaveAuthConfig(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
p.RecordEvent(entity.EventTypeSystemAuth)
|
||||
|
||||
p.Context.Transaction.Commit()
|
||||
|
||||
util.WriteSuccessEmptyJSON(w)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue