Skip to content

Commit

Permalink
fix: rename to countryCodes
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed May 1, 2024
1 parent 43393f0 commit 3a45a4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions object/application_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ func (application *Application) GetProviderByCategory(category string) (*Provide
}

func isProviderItemCountryCodeMatched(providerItem *ProviderItem, countryCode string) bool {
if len(providerItem.CountryCode) == 0 {
if len(providerItem.CountryCodes) == 0 {
return true
}

for _, countryCode2 := range providerItem.CountryCode {
for _, countryCode2 := range providerItem.CountryCodes {
if countryCode2 == "" || countryCode2 == "All" || countryCode2 == "all" || countryCode2 == countryCode {
return true
}
Expand Down
16 changes: 8 additions & 8 deletions object/provider_item.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ type ProviderItem struct {
Owner string `json:"owner"`
Name string `json:"name"`

CanSignUp bool `json:"canSignUp"`
CanSignIn bool `json:"canSignIn"`
CanUnlink bool `json:"canUnlink"`
CountryCode []string `json:"countryCode"`
Prompted bool `json:"prompted"`
SignupGroup string `json:"signupGroup"`
Rule string `json:"rule"`
Provider *Provider `json:"provider"`
CanSignUp bool `json:"canSignUp"`
CanSignIn bool `json:"canSignIn"`
CanUnlink bool `json:"canUnlink"`
CountryCodes []string `json:"countryCode"`
Prompted bool `json:"prompted"`
SignupGroup string `json:"signupGroup"`
Rule string `json:"rule"`
Provider *Provider `json:"provider"`
}

func (application *Application) GetProviderItem(providerName string) *ProviderItem {
Expand Down

0 comments on commit 3a45a4e

Please sign in to comment.