From b736eb2a23e698907249f8cb97e90e6322adb63a 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 f0ebc742..7d3f96dc 100644 --- a/pkg/model/config.go +++ b/pkg/model/config.go @@ -158,12 +158,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