replace russian logs

This commit is contained in:
Pavel 2024-01-04 14:32:27 +03:00
parent d944d14ec2
commit ebe7702d77
2 changed files with 7 additions and 10 deletions

@ -78,7 +78,7 @@ func (r *RecoveryEmailSender) SendRecoveryEmail(email string, signature []byte)
if statusCode != fiber.StatusOK {
err := fmt.Errorf("the SMTP service returned an error: %s Response body: %s", statusCode, body)
r.deps.Logger.Error("Ошибка при отправке электронной почты", zap.Error(err))
r.deps.Logger.Error("Error sending email", zap.Error(err))
return err
}

@ -104,20 +104,17 @@ func (s *RecoveryService) GetRecoveryRecord(ctx context.Context, key string) (*m
}
result, err := s.encrypt.VerifySignature(byteKey)
if err != nil {
if err != nil || result == false {
s.logger.Error("Failed to verify signature", zap.String("signature", key), zap.Error(err))
return nil, err
}
if result {
req, err := s.repositoryCodeword.GetRecoveryRecord(ctx, key)
if err != nil {
s.logger.Error("Failed to obtain signature recovery data", zap.String("signature", key), zap.Error(err))
return nil, err
}
return req, nil
req, err := s.repositoryCodeword.GetRecoveryRecord(ctx, key)
if err != nil {
s.logger.Error("Failed to obtain signature recovery data", zap.String("signature", key), zap.Error(err))
return nil, err
}
return nil, nil
return req, nil
}
// ExchangeForTokens обменивает ссылку восстановления на токены используя сервис аутентификации.