updated some names

This commit is contained in:
Paul 2022-11-10 12:50:53 +01:00
parent 85a7d0bb3a
commit 74543480f1
2 changed files with 11 additions and 11 deletions

View File

@ -103,9 +103,9 @@ func (ip *IP) GetGeoIP() (err error) {
ip.City = city.City.Names[defaultLanguage]
ip.Country = city.Country.Names[defaultLanguage]
ip.Asn = ASN{
ID: int(asn.AutonomousSystemNumber),
Name: asn.AutonomousSystemOrganization,
ip.As = AS{
Number: int(asn.AutonomousSystemNumber),
Org: asn.AutonomousSystemOrganization,
}
return
@ -117,10 +117,10 @@ type IP struct {
Hostname string `json:"hostname"`
City string `json:"city"`
Country string `json:"country"`
Asn ASN `json:"asn"`
As AS `json:"as"`
}
type ASN struct {
ID int `json:"id"`
Name string `json:"name"`
type AS struct {
Number int `json:"number"`
Org string `json:"org"`
}

View File

@ -23,13 +23,13 @@
<td>{{ "{{" }} dip.country {{ "}}" }}</td>
</tr>
<tr>
<td>ASN id</td>
<td>{{ "{{" }} dip.asn.id {{ "}}" }}</td>
<td>AS number</td>
<td>{{ "{{" }} dip.as.number {{ "}}" }}</td>
</tr>
<tr>
<td>ASN name</td>
<td>AS name</td>
<td>
{{ "{{" }} dip.asn.name {{ "}}" }}
{{ "{{" }} dip.as.org {{ "}}" }}
</td>
</tr>
</div>