mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
715d908613
Notable refactoring: - Use stdlib "context" in place of "golang.org/x/net/context" - Go-kit no longer wraps errors, so we remove the unwrap in transport_error.go - Use MakeHandler when setting up endpoint tests (fixes test bug caught during this refactoring) Closes #1411.
24 lines
415 B
Go
24 lines
415 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.logger.Log(
|
|
"method",
|
|
"CommitEmailChange",
|
|
"err", err,
|
|
"took", time.Since(begin),
|
|
)
|
|
}(time.Now())
|
|
newMail, err = mw.Service.ChangeUserEmail(ctx, token)
|
|
return newMail, err
|
|
}
|