Skip to content

Commit

Permalink
missed the plural on "workspaces"
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jun 15, 2023
1 parent 093cede commit 3ef9e36
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,12 @@ func getWorkspacePage(url string) (WorkspaceList, error) {
}

func GetWorkspaceData(organization, workspaceName string) (WorkspaceJSON, error) {
if organization == "" {
return WorkspaceJSON{}, fmt.Errorf("GetWorkspaceData: organization is required")
}
if workspaceName == "" {
return WorkspaceJSON{}, fmt.Errorf("GetWorkspaceData: workspace is required")
}
u := NewTfcUrl(fmt.Sprintf(
"/organizations/%s/workspaces/%s",
organization,
Expand Down Expand Up @@ -1258,7 +1264,7 @@ func AddRemoteStateConsumers(workspaceID string, consumerIDs []string) error {
}
for i, id := range consumerIDs {
if _, err := data.S("data").SetIndex(map[string]any{
"type": "workspace",
"type": "workspaces",
"id": id,
}, i); err != nil {
return fmt.Errorf("SetIndex failed in AddRemoteStateConsumers: %w", err)
Expand Down

0 comments on commit 3ef9e36

Please sign in to comment.