mirror of
https://github.com/documize/community.git
synced 2025-07-23 15:19:42 +02:00
improved event logging
This commit is contained in:
parent
92eca1a1ce
commit
2d5b8e652f
13 changed files with 1882 additions and 4 deletions
|
@ -19,6 +19,7 @@ import (
|
|||
"github.com/documize/community/core/api/entity"
|
||||
"github.com/documize/community/core/log"
|
||||
"github.com/documize/community/core/utility"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// AddAccount inserts the given record into the datbase account table.
|
||||
|
@ -30,14 +31,14 @@ func (p *Persister) AddAccount(account entity.Account) (err error) {
|
|||
defer utility.Close(stmt)
|
||||
|
||||
if err != nil {
|
||||
log.Error("Unable to prepare insert for account", err)
|
||||
errors.Wrap(err, "Unable to prepare insert for account")
|
||||
return
|
||||
}
|
||||
|
||||
_, err = stmt.Exec(account.RefID, account.OrgID, account.UserID, account.Admin, account.Editor, account.Active, account.Created, account.Revised)
|
||||
|
||||
if err != nil {
|
||||
log.Error("Unable to execute insert for account", err)
|
||||
errors.Wrap(err, "Unable to execute insert for account")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue