fix: resolve duplicate methods and missing imports in usecases
This commit is contained in:
parent
fa9ddbdeef
commit
742a93ddfc
3 changed files with 4 additions and 19 deletions
|
|
@ -3,6 +3,7 @@ package usecase
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/gofrs/uuid/v5"
|
"github.com/gofrs/uuid/v5"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,11 @@ package usecase
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/gofrs/uuid/v5"
|
"github.com/gofrs/uuid/v5"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,22 +157,3 @@ func (s *Service) GetNotificationService() notifications.NotificationService {
|
||||||
return s.notify
|
return s.notify
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeleteAddress handles address removal logic.
|
|
||||||
func (s *Service) DeleteAddress(ctx context.Context, id uuid.UUID) error {
|
|
||||||
return s.repo.DeleteAddress(ctx, id)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListManufacturers returns manufacturers from the repo.
|
|
||||||
func (s *Service) ListManufacturers(ctx context.Context) ([]string, error) {
|
|
||||||
return s.repo.ListManufacturers(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListCategories returns categories from the repo.
|
|
||||||
func (s *Service) ListCategories(ctx context.Context) ([]string, error) {
|
|
||||||
return s.repo.ListCategories(ctx)
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetProductByEAN finds a product by its EAN code.
|
|
||||||
func (s *Service) GetProductByEAN(ctx context.Context, ean string) (*domain.Product, error) {
|
|
||||||
return s.repo.GetProductByEAN(ctx, ean)
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue