From e8586826bc821104fe155a4db9a4be8e7bf86623 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Mon, 9 Mar 2026 09:27:32 -0300 Subject: [PATCH] fix: geocode tool repository interface cast --- backend/cmd/geocode_sync/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/cmd/geocode_sync/main.go b/backend/cmd/geocode_sync/main.go index ad4d59d..f6b7621 100644 --- a/backend/cmd/geocode_sync/main.go +++ b/backend/cmd/geocode_sync/main.go @@ -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())