mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
df93abd722
* Moves much logging from the info level to the debug level * Tries to retain security/auditing relevant logs at info level
24 lines
428 B
Go
24 lines
428 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
func (mw loggingMiddleware) ChangeUserEmail(ctx context.Context, token string) (string, error) {
|
|
var (
|
|
err error
|
|
newMail string
|
|
)
|
|
defer func(begin time.Time) {
|
|
_ = mw.loggerInfo(err).Log(
|
|
"method",
|
|
"CommitEmailChange",
|
|
"err", err,
|
|
"took", time.Since(begin),
|
|
)
|
|
}(time.Now())
|
|
newMail, err = mw.Service.ChangeUserEmail(ctx, token)
|
|
return newMail, err
|
|
}
|