Skip to content

Commit

Permalink
[CHANGE] made cluster_traffic a string, this allows the server to do …
Browse files Browse the repository at this point in the history
…whatever it wants, while validations are casted to the `ClusterTraffic` string type.
  • Loading branch information
aricart committed Sep 26, 2024
1 parent 18a60d6 commit fbaa154
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions v2/account_claims.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ type Account struct {
Mappings Mapping `json:"mappings,omitempty"`
Authorization ExternalAuthorization `json:"authorization,omitempty"`
Trace *MsgTrace `json:"trace,omitempty"`
ClusterTraffic ClusterTraffic `json:"cluster_traffic,omitempty"`
ClusterTraffic string `json:"cluster_traffic,omitempty"`
Info
GenericFields
}
Expand Down Expand Up @@ -324,7 +324,8 @@ func (a *Account) Validate(acct *AccountClaims, vr *ValidationResults) {
a.SigningKeys.Validate(vr)
a.Info.Validate(vr)

if err := a.ClusterTraffic.Valid(); err != nil {
ct := ClusterTraffic(a.ClusterTraffic)
if err := ct.Valid(); err != nil {
vr.AddError(err.Error())
}
}
Expand Down

0 comments on commit fbaa154

Please sign in to comment.