mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Add missing '&' (#329)
This commit is contained in:
@@ -499,15 +499,17 @@ func (domain *Domain) CacheReadToken(ctx context.Context, token string) (string,
|
||||
|
||||
var email string
|
||||
|
||||
expires, err := cache.Context(ctx).Get(token, email)
|
||||
expires, err := cache.Context(ctx).Get(token, &email)
|
||||
|
||||
if err != nil && err == cache.ErrNotFound {
|
||||
return "", errors.New("token not found")
|
||||
} else if time.Until(expires).Seconds() < 0 {
|
||||
return "", errors.New("token expired")
|
||||
} else if err != nil {
|
||||
return "", microerr.InternalServerError("CacheReadToken", err.Error())
|
||||
}
|
||||
|
||||
if time.Until(expires).Seconds() < 0 {
|
||||
return "", errors.New("token expired")
|
||||
}
|
||||
|
||||
return email, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user