Skip to content

Commit 2688815

Browse files
David-KreinerHarness
authored andcommitted
feat: [ML-1197]: Fix urls for ng-manager apis (#45)
* feat: [ML-1197]: Fix urls for ng-manager apis
1 parent d28463f commit 2688815

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

client/connectors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
)
1010

1111
const (
12-
listConnectorCataloguePath = "/api/connectors/catalogue"
13-
getConnectorPath = "/api/connectors/%s"
12+
listConnectorCataloguePath = "/connectors/catalogue"
13+
getConnectorPath = "/connectors/%s"
1414
)
1515

1616
type ConnectorService struct {

client/environments.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
)
99

1010
const (
11-
environmentListPath = "/api/environments"
12-
environmentGetPath = "/api/environments/%s"
13-
environmentMoveConfigsPath = "/api/environments/V2/move-config/%s"
11+
environmentListPath = "/environments"
12+
environmentGetPath = "/environments/%s"
13+
environmentMoveConfigsPath = "/environments/V2/move-config/%s"
1414
)
1515

1616
type EnvironmentClient struct {

client/infrastructure.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
)
99

1010
const (
11-
infrastructureListPath = "/api/infrastructures"
12-
infrastructureMoveConfigsPath = "/api/infrastructures/move-config/%s"
11+
infrastructureListPath = "/infrastructures"
12+
infrastructureMoveConfigsPath = "/infrastructures/move-config/%s"
1313
)
1414

1515
type InfrastructureClient struct {

client/service.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
)
99

1010
const (
11-
serviceListPath = "/api/services"
12-
serviceGetPath = "/api/services/%s"
11+
serviceListPath = "/services"
12+
serviceGetPath = "/services/%s"
1313
)
1414

1515
type ServiceClient struct {

pkg/harness/tools.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ func registerChatbot(config *config.Config, tsg *toolsets.ToolsetGroup) error {
403403

404404
// registerConnectors registers the connectors toolset
405405
func registerConnectors(config *config.Config, tsg *toolsets.ToolsetGroup) error {
406-
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng")
406+
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng/api")
407407
secret := config.NgManagerSecret
408408

409409
c, err := createClient(baseURL, config, secret)
@@ -427,7 +427,7 @@ func registerConnectors(config *config.Config, tsg *toolsets.ToolsetGroup) error
427427
// registerInfrastructure registers the infrastructure toolset
428428
func registerInfrastructure(config *config.Config, tsg *toolsets.ToolsetGroup) error {
429429
// Determine the base URL and secret for infrastructure
430-
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng")
430+
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng/api")
431431
secret := config.NgManagerSecret
432432

433433
// Create base client for infrastructure
@@ -455,7 +455,7 @@ func registerInfrastructure(config *config.Config, tsg *toolsets.ToolsetGroup) e
455455
// registerEnvironments registers the environments toolset
456456
func registerEnvironments(config *config.Config, tsg *toolsets.ToolsetGroup) error {
457457
// Determine the base URL and secret for environments
458-
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng")
458+
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng/api")
459459
secret := config.NgManagerSecret
460460

461461
// Create base client for environments
@@ -484,7 +484,7 @@ func registerEnvironments(config *config.Config, tsg *toolsets.ToolsetGroup) err
484484
// registerServices registers the services toolset
485485
func registerServices(config *config.Config, tsg *toolsets.ToolsetGroup) error {
486486
// Determine the base URL and secret for services
487-
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng")
487+
baseURL := buildServiceURL(config, config.NgManagerBaseURL, config.BaseURL, "ng/api")
488488
secret := config.NgManagerSecret
489489

490490
// Create base client for services

0 commit comments

Comments
 (0)