gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.5k stars 552 forks source link

The "Allowed IPs" field on the "Node Details" page is serialized incorrectly, preventing changes via the UI #489

Closed frazerk closed 2 years ago

frazerk commented 2 years ago

This is on v0.9.0

Attempting to edit the "Allowed IPs" field on the "Node Details" page in the UI always fails, with a JSON unmarshalling error from netmaker-server:

{"Code":400,"Message":"json: cannot unmarshal string into Go struct field Node.allowedips of type []string"}

The UI is serializing this field as a string rather than an array for any number of IPs entered into the field. If I manually edit and re-send the XHR request to have the field serialized as an array, it works.

0xdcarns commented 2 years ago

Hi @frazerk , The UI has been updated. Thank you for pointing this out! If you could, please re-pull it and confirm and then we can close this issue.

frazerk commented 2 years ago

Hello @0xdcarns, thanks for the quick response! That fixed it.