|
@@ -74,14 +74,17 @@ func (s *Store) Close() {
|
|
|
}
|
|
|
|
|
|
func (s *Store) AddCountryCodeToBlackList(countryCode string) {
|
|
|
+ countryCode = strings.ToLower(countryCode)
|
|
|
s.sysdb.Write("blacklist-cn", countryCode, true)
|
|
|
}
|
|
|
|
|
|
func (s *Store) RemoveCountryCodeFromBlackList(countryCode string) {
|
|
|
+ countryCode = strings.ToLower(countryCode)
|
|
|
s.sysdb.Delete("blacklist-cn", countryCode)
|
|
|
}
|
|
|
|
|
|
func (s *Store) IsCountryCodeBlacklisted(countryCode string) bool {
|
|
|
+ countryCode = strings.ToLower(countryCode)
|
|
|
var isBlacklisted bool = false
|
|
|
s.sysdb.Read("blacklist-cn", countryCode, &isBlacklisted)
|
|
|
return isBlacklisted
|