fleet/server/service/logging_email_change.go

24 lines
428 B
Go
Raw Normal View History

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
}