Omit empty NetworkID in account resource (#59)

* Omit empty NetworkID in account

* Run `go generate`

* Fix tests

Co-authored-by: Joshua Spence <josh@joshuaspence.com>
This commit is contained in:
Oskar
2022-01-31 05:58:42 +01:00
committed by GitHub
parent 5351452eca
commit 3e7bd072ea
8 changed files with 104 additions and 11 deletions

View File

@@ -137,6 +137,7 @@ type Network struct {
ReportWANEvent bool `json:"report_wan_event"`
RequireMschapv2 bool `json:"require_mschapv2"`
RouteDistance int `json:"route_distance,omitempty"` // ^[1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]$|^$
TeleportEnabled bool `json:"teleport_enabled"`
UpnpLanEnabled bool `json:"upnp_lan_enabled"`
UserGroupID string `json:"usergroup_id"`
VLAN int `json:"vlan,omitempty"` // [2-9]|[1-9][0-9]{1,2}|[1-3][0-9]{3}|400[0-9]|^$