fix: geocode tool repository interface cast
This commit is contained in:
parent
68948e3c96
commit
e8586826bc
1 changed files with 4 additions and 2 deletions
|
|
@ -29,8 +29,10 @@ func main() {
|
|||
mapboxClient := mapbox.New(cfg.MapboxAccessToken)
|
||||
notifySvc := notifications.NewLoggerNotificationService()
|
||||
|
||||
// Correct parameters for NewService: repo, pay, mapbox, notify, commission, buyerFee, jwtSecret, ttl, pepper
|
||||
svc := usecase.NewService(repo, nil, mapboxClient, notifySvc, 12.0, 0.06, cfg.JWTSecret, cfg.JWTExpiresIn, cfg.PasswordPepper)
|
||||
// Ensure we cast repo to usecase.Repository interface explicitly if needed, but Go does this implicitly if methods match.
|
||||
// NewService expects: Repository, PaymentGateway, *mapbox.Client, NotificationService, ...
|
||||
var repoInterface usecase.Repository = repo
|
||||
svc := usecase.NewService(repoInterface, nil, mapboxClient, notifySvc, 12.0, 0.06, cfg.JWTSecret, cfg.JWTExpiresIn, cfg.PasswordPepper)
|
||||
|
||||
fmt.Println("Starting retroactive geocode sync...")
|
||||
count, err := svc.GeocodeAllAddresses(context.Background())
|
||||
|
|
|
|||
Loading…
Reference in a new issue