Преглед на файлове

auto update script executed

Toby Chui преди 1 година
родител
ревизия
f87c1dec63
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  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