mirror of https://github.com/mpolden/echoip
better empty threatthypes handling
This commit is contained in:
parent
35187e67e5
commit
9217488362
|
@ -62,7 +62,7 @@ func (ips *IPStack) ParseSecurityResponse(parserResponse *parser.Response) {
|
|||
CrawlerName: ips.response.Security.CrawlerName,
|
||||
CrawlerType: ips.response.Security.CrawlerType,
|
||||
ThreatLevel: ips.response.Security.ThreatLevel,
|
||||
ThreatTypes: ips.response.Security.ThreatTypes,
|
||||
ThreatTypes: ips.response.Security.ThreatTypes.([]string),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ type Security struct {
|
|||
CrawlerType string `json:"crawler_type,omitempty"`
|
||||
IsTor bool `json:"is_tor"`
|
||||
ThreatLevel string `json:"threat_level,omitempty"`
|
||||
ThreatTypes interface{} `json:"threat_types,omitempty"`
|
||||
ThreatTypes []string `json:"threat_types,omitempty"`
|
||||
}
|
||||
|
||||
type Timezone struct {
|
||||
|
|
Loading…
Reference in New Issue