Skip to content

Commit

Permalink
fix initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
pablomendezroyo committed Dec 5, 2024
1 parent 9752232 commit 1afcc0d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func main() {
logger.Fatal("Failed to initialize relaysAllowedAdapter: %v", err)
}

apiAdapter := api.NewAPIAdapter(storageAdapter, relaysUsedAdapter, relaysAllowedAdapter, networkConfig.CORS)
apiAdapter := api.NewAPIAdapter(ctx, storageAdapter, relaysUsedAdapter, relaysAllowedAdapter, networkConfig.CORS)
proxyApiAdapter := proxyapi.NewProxyAPIAdapter(networkConfig.CORS, networkConfig.LidoKeysApiUrl)

// Initialize API services
Expand Down
3 changes: 1 addition & 2 deletions internal/adapters/api/api_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ func (h *APIHandler) GetRouter() http.Handler {
}

// NewAPIAdapter initializes the APIHandler and sets up routes with CORS enabled
func NewAPIAdapter(ctx context.Context, storagePort ports.StoragePort, notifierPort ports.NotifierPort, relaysUsedPort ports.RelaysUsedPort, relaysAllowedPort ports.RelaysAllowedPort, allowedOrigins []string) *APIHandler {
func NewAPIAdapter(ctx context.Context, storagePort ports.StoragePort, relaysUsedPort ports.RelaysUsedPort, relaysAllowedPort ports.RelaysAllowedPort, allowedOrigins []string) *APIHandler {
h := &APIHandler{
ctx: ctx,
StoragePort: storagePort,
NotifierPort: notifierPort,
RelaysUsedPort: relaysUsedPort,
RelaysAllowedPort: relaysAllowedPort,
Router: mux.NewRouter(),
Expand Down

0 comments on commit 1afcc0d

Please sign in to comment.