Update dns list
This commit is contained in:
@@ -73,7 +73,7 @@ func (c *Client) list{{ .StructName }}(ctx context.Context, site string) ([]{{ .
|
|||||||
Data []{{ .StructName }} `json:"data"`
|
Data []{{ .StructName }} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/{{ if eq .StructName "Device" }}stat/{{ else if $apiVersion2 }}{{ else }}rest/{{ end }}{{ .ResourcePath }}", site), nil, &respBody)
|
err := c.do(ctx, "GET", fmt.Sprintf("{{ if eq .StructName "DNSRecord" }}%s/site/%s/{{ .ResourcePath }}", c.apiV2Path{{ else }}s/%s/{{ if eq .StructName "Device" }}stat/{{ else if $apiVersion2 }}{{ else }}rest/{{ end }}{{ .ResourcePath }}"{{ end }}, site), nil, &respBody)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
2
unifi/dns_record.generated.go
generated
2
unifi/dns_record.generated.go
generated
@@ -64,7 +64,7 @@ func (c *Client) listDNSRecord(ctx context.Context, site string) ([]DNSRecord, e
|
|||||||
Data []DNSRecord `json:"data"`
|
Data []DNSRecord `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
err := c.do(ctx, "GET", fmt.Sprintf("s/%s/static-dns", site), nil, &respBody)
|
err := c.do(ctx, "GET", fmt.Sprintf("%s/site/%s/static-dns", c.apiV2Path, site), nil, &respBody)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user