Skip to content

Commit

Permalink
fix: Stripped out fields which can cause issues with unmarshalling th…
Browse files Browse the repository at this point in the history
…e json data structure (#29)

fix: Stripped these fields out as they're not used and can cause issues with the json unmarshal
  • Loading branch information
riweston authored Mar 21, 2024
1 parent d679a40 commit b412c78
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pkg/profile/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ type Subscription struct {
Name string `json:"name"`
Type string `json:"type"`
} `json:"user"`
IsDefault bool `json:"isDefault"`
TenantID uuid.UUID `json:"tenantId"`
EnvironmentName string `json:"environmentName"`
HomeTenantID uuid.UUID `json:"homeTenantId"`
ManagedByTenants []struct {
TenantID uuid.UUID `json:"tenantId"`
} `json:"managedByTenants"`
IsDefault bool `json:"isDefault"`

// These fields are commented out in case they are needed in the future.
// They cause some issues with unmarshalling if they're not present in the JSON, as they're not used we'll just ignore them

//TenantID uuid.UUID `json:"tenantId"`
//EnvironmentName string `json:"environmentName"`
//HomeTenantID uuid.UUID `json:"homeTenantId"`
//ManagedByTenants []*struct {
// TenantID uuid.UUID `json:"tenantId"`
//} `json:"managedByTenants"`
}

0 comments on commit b412c78

Please sign in to comment.