fix: adjust Dns_Tbl parser

With firmware 3.0.41-IMS-KDG the `Dns_Tbl` format changed:

```json
{
	"Dns_Tbl": [{
			"__id": "1",
			"dns": "83.169.186.33",
			"Type": "DHCPv4"
		},
		{
			"__id": "2",
			"dns": "83.169.186.97",
			"Type": "DHCPv4"
		}
	]
}
```
This commit is contained in:
Gregor Jasny 2022-04-30 13:52:01 +02:00 committed by Ruben Jenster
parent 5285dddf4b
commit 6416edb90c

View file

@ -102,6 +102,12 @@ type StationStatusReponse struct {
Data *StationStatusData `json:"data"`
}
type DNSTable struct {
Id string `json:"__id"`
Type string `json:"Type"`
Dns string `json:"dns"`
}
type StationStatusData struct {
DateAndTime string `json:"dateandtime"`
FirewallStatus string `json:"firewallstatus"`
@ -139,7 +145,7 @@ type StationStatusData struct {
HardwareType string `json:"hardwaretype"`
Uptime string `json:"uptime"`
InternetIpv4 string `json:"internetipv4"`
DnsTbl []string `json:"Dns_Tbl"`
DnsTbl []DNSTable `json:"Dns_Tbl"`
DelegatedPrefix string `json:"DelegatedPrefix"`
DNSTblRT []string `json:"DNSTblRT"`
IPAddressRT []string `json:"IPAddressRT"`