mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-24 08:20:31 +08:00
fix: rename to countryCodes
This commit is contained in:
parent
43393f034b
commit
3a45a4ee77
@ -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
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ type ProviderItem struct {
|
||||
CanSignUp bool `json:"canSignUp"`
|
||||
CanSignIn bool `json:"canSignIn"`
|
||||
CanUnlink bool `json:"canUnlink"`
|
||||
CountryCode []string `json:"countryCode"`
|
||||
CountryCodes []string `json:"countryCode"`
|
||||
Prompted bool `json:"prompted"`
|
||||
SignupGroup string `json:"signupGroup"`
|
||||
Rule string `json:"rule"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user