Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions cmd/baton-tableau/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"net/url"
"os"
"strings"

"github.com/conductorone/baton-sdk/pkg/connectorbuilder"
"github.com/conductorone/baton-sdk/pkg/field"
Expand Down Expand Up @@ -48,12 +49,13 @@ func getConnector(ctx context.Context, tc *cfg.Tableau) (types.ConnectorServer,
return nil, err
}

apiVersion := tc.ApiVersion
if apiVersion == "" {
apiVersion = "3.17"
apiVersion := "3.19"
if tc.ApiVersion != "" {
apiVersion = tc.ApiVersion
}

serverPath := tc.ServerPath
serverPath = strings.TrimPrefix(serverPath, "https://")
serverPath = strings.TrimPrefix(serverPath, "http://")
baseUrl, err := url.JoinPath("https://", serverPath, "api", apiVersion)
if err != nil {
l.Error("error creating base url", zap.Error(err))
Expand Down