Skip to content

Commit

Permalink
Align workspace_access client workspace_id logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchnielsen committed Dec 13, 2024
1 parent 35513b9 commit 06df965
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/client/workspace_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ func (c *Client) WorkspaceAccess(accountID uuid.UUID, workspaceID uuid.UUID) (ap
if accountID == uuid.Nil {
accountID = c.defaultAccountID
}

if workspaceID == uuid.Nil {
workspaceID = c.defaultWorkspaceID
}
if accountID == uuid.Nil || workspaceID == uuid.Nil {
return nil, fmt.Errorf("both accountID and workspaceID must be defined")

if err := validateCloudEndpoint(c.endpoint, accountID, workspaceID); err != nil {
return nil, err
}

return &WorkspaceAccessClient{
Expand Down

0 comments on commit 06df965

Please sign in to comment.