API Bug(?) POST/PUT Gateway

When using API calls to POST the gateway data, which is correctly formatted, the location and the gateway profile are not set, even though they are explicitly included in the JSON object. (I tried this using node.js and using the LoRa App Server REST API, just to be sure that it wasn’t a mistake I was making.)

If I POST the above information for the gateway on a correctly set up loraserver, it correctly sets up everything using the information I provide, except for the gateway profile and the location. If I follow that up with a PUT of the exact same JSON object, then it does add the location and the gateway profile to the loraserver. I have also tested this POST-then-PUT method with both the LoRa App Server REST API and node.js, and both times it is successful.

Is this a bug, that those are not being added to the loraserver’s database during a POST?

Edit: After an initial POST, even if the gatewayProfileID and location data has been provided, using a GET function reveals that the gateayProfileID is set to “” and the location data is set to its default values.

Please post bugreports to GitHub: https://github.com/brocaar/lora-app-server/issues.