Fix prefixes as well

This commit is contained in:
Kalle Carlbark 2020-12-22 16:44:19 +01:00
parent 550adeb746
commit 77e28e6f1e
No known key found for this signature in database
GPG key ID: 5E4BAB01A57CDD62

View file

@ -71,7 +71,7 @@ type IpamPrefixesList struct {
} `json:"vlan"` } `json:"vlan"`
Status struct { Status struct {
Label string `json:"label"` Label string `json:"label"`
Value int `json:"value"` Value string `json:"value"`
} `json:"status"` } `json:"status"`
Role struct { Role struct {
ID int `json:"id"` ID int `json:"id"`
@ -125,7 +125,7 @@ type PrefixFilter struct {
// ListPrefixes returns Netbox ipam_prefixes_list // ListPrefixes returns Netbox ipam_prefixes_list
func (n *NetBox) ListPrefixes(i *IpamPrefixesList, f *PrefixFilter) error { func (n *NetBox) ListPrefixes(i *IpamPrefixesList, f *PrefixFilter) error {
var encoder = schema.NewEncoder() encoder := schema.NewEncoder()
form := url.Values{} form := url.Values{}
err := encoder.Encode(f, form) err := encoder.Encode(f, form)