소스 검색

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