modified: internal/service/user_service.go

fic bag with check the user exits
This commit is contained in:
2025-09-27 05:11:40 +05:00
parent a2133fe72f
commit 9706380a7d
@@ -20,7 +20,6 @@ func NewUserService(userRepo *repository.UserRepository) *UserService {
func (s *UserService) CreateUser(req *model.CreateUserRequest) (*model.UserResponse, error) {
// Проверяем существует ли пользователь с таким email
existingUser, err := s.userRepo.FindByEmail(req.Email)
fmt.Println(existingUser, err)
if err.Error() != "record not found" {
return nil, errors.New("user with this email already exists")
}