Skip to content

Commit 3699250

Browse files
committed
fix connector creation. add models. bugfixes
1 parent d11ad93 commit 3699250

9 files changed

Lines changed: 828 additions & 167 deletions

internal/resources/connectors.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,18 +128,13 @@ func resolveConnectorID(ctx context.Context, c *client.Client, params map[string
128128
workspaceName := applyDefaultWorkspace(params)
129129

130130
raw, err := c.Get(ctx, "/api/v1/integrations/connectors", map[string]string{
131-
"customer_name": workspaceName,
131+
"workspace_name": workspaceName,
132132
})
133133
if err != nil {
134134
return nil, err
135135
}
136136

137-
var resp struct {
138-
Data []struct {
139-
ID string `json:"id"`
140-
Name string `json:"name"`
141-
} `json:"data"`
142-
}
137+
var resp connectorLookupResponse
143138
if err := json.Unmarshal(raw, &resp); err != nil {
144139
return nil, fmt.Errorf("parsing connectors list: %w", err)
145140
}
@@ -195,7 +190,7 @@ func applyDefaultWorkspace(params map[string]any) string {
195190
func connectorsList(ctx context.Context, c *client.Client, params map[string]any) (any, error) {
196191
workspaceName := applyDefaultWorkspace(params)
197192
raw, err := c.Get(ctx, "/api/v1/integrations/connectors", map[string]string{
198-
"customer_name": workspaceName,
193+
"workspace_name": workspaceName,
199194
})
200195
if err != nil {
201196
return nil, err

0 commit comments

Comments
 (0)