Bläddra i källkod

auto update script executed

Toby Chui 1 år sedan
förälder
incheckning
f87c1dec63
1 ändrade filer med 3 tillägg och 0 borttagningar
  1. 3 0
      mod/geodb/geodb.go

+ 3 - 0
mod/geodb/geodb.go

@@ -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