diff --git a/websocket_utils/websocket_utils.go b/websocket_utils/websocket_utils.go index 029bff696c1f3071ee78822de2306bb9aecdeac2..921e7e11c7209982c7383ccbfa5c27959993aa8d 100644 --- a/websocket_utils/websocket_utils.go +++ b/websocket_utils/websocket_utils.go @@ -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, }