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

[Bug]: API, impossible to add gateway to a node #928

Closed TheNexter closed 2 years ago

TheNexter commented 2 years ago

Contact Details

No response

What happened?

curl -d '{ "rangestring": "145.0.0.1/24", "interface": "netmakerdocker"}' -H 'Content-Type: application/json' -H "authorization: Bearer myprivatekey" localhost:8081/api/nodes/netmaker/mynodeid/creategateway

Version

v0.12.0

What OS are you using?

Linux

Relevant log output

{"Code":500,"Message":"IP Ranges Cannot Be Empty"}

Contributing guidelines

afeiszli commented 2 years ago

appropriate format for the API call is curl -d '{ "ranges": ["145.0.0.1/24"],

Tested and works. Please consider opening an issue or PR on the netmaker-docs repo to have the reference updated: https://github.com/gravitl/netmaker-docs