From c594f32ba68929e5f9cd62e8650bacd3b5c754b8 Mon Sep 17 00:00:00 2001 From: Mats Kramer Date: Fri, 20 Dec 2024 11:50:50 +0100 Subject: [PATCH] Portal now has config with fewer levels --- internal/portal/apiv1/client.go | 2 +- pkg/model/config.go | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/internal/portal/apiv1/client.go b/internal/portal/apiv1/client.go index 2ab51743..80095dd4 100644 --- a/internal/portal/apiv1/client.go +++ b/internal/portal/apiv1/client.go @@ -28,7 +28,7 @@ func New(ctx context.Context, tracer *trace.Tracer, cfg *model.Cfg, log *logger. } var err error - c.datastoreClient, err = datastoreclient.New(&datastoreclient.Config{URL: cfg.Portal.Services.APIGW.BaseURL}) + c.datastoreClient, err = datastoreclient.New(&datastoreclient.Config{URL: cfg.Portal.ApigwApiServer.Addr}) if err != nil { return nil, err } diff --git a/pkg/model/config.go b/pkg/model/config.go index 2c8548b2..4e5aad7e 100644 --- a/pkg/model/config.go +++ b/pkg/model/config.go @@ -159,12 +159,8 @@ type APIGW struct { // Portal holds the persistent storage configuration type Portal struct { - APIServer APIServer `yaml:"api_server" validate:"required"` - Services struct { - APIGW struct { - BaseURL string `yaml:"base_url"` - } `yaml:"apigw"` - } `yaml:"services"` + APIServer APIServer `yaml:"api_server" validate:"required"` + ApigwApiServer APIServer `yaml:"apigw_api_server" validate:"required"` } // OTEL holds the opentelemetry configuration