Skip to content
Snippets Groups Projects
Commit 15cca2ed authored by Jano Hendriks's avatar Jano Hendriks
Browse files

Update URL for websocket API

parent 0da918e6
No related branches found
Tags v1.286.0
No related merge requests found
......@@ -26,8 +26,6 @@ func GetClient(region ...string) *APIGateWayClientWithHelpers {
logs.ErrorMsg("WEBSOCKET_DOMAIN_NAME env variable is not set")
return &APIGateWayClientWithHelpers{}
}
env := utils.GetEnv("ENVIRONMENT", "dev")
s3Region := os.Getenv("AWS_REGION")
// Set custom region
......@@ -49,15 +47,15 @@ func GetClient(region ...string) *APIGateWayClientWithHelpers {
return &APIGateWayClientWithHelpers{}
}
apiGatewaySession := NewClient(cfg, domainName, env)
apiGatewaySession := NewClient(cfg, domainName)
sessions[s3Region] = apiGatewaySession
return apiGatewaySession
}
func NewClient(config aws.Config, domainName string, env string) *APIGateWayClientWithHelpers {
func NewClient(config aws.Config, domainName string) *APIGateWayClientWithHelpers {
return &APIGateWayClientWithHelpers{
APIGatewayClient: apigatewaymanagementapi.NewFromConfig(config, func(o *apigatewaymanagementapi.Options) {
o.BaseEndpoint = utils.ValueToPointer(fmt.Sprintf("https://%s/%s", domainName, env))
o.BaseEndpoint = utils.ValueToPointer(fmt.Sprintf("https://%s/default", domainName))
}),
Available: true,
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment