Open cdupont opened 3 years ago
If you try to create a device twice, it result in an error 500:
$ TOK=`curl -vvv -X POST "http://172.16.11.187/auth/token" -d "{\"username\":\"admin\",\"password\":\"loragateway\"}" | tr -d '"'` $ curl -X POST "http://172.16.11.187/devices" -H "accept: text/plain" -H "Content-Type: application/json" -H "Authorization: Bearer $TOK" -d '{"id" : "test"}' $ curl -X POST "http://172.16.11.187/devices" -H "accept: text/plain" -H "Content-Type: application/json" -H "Authorization: Bearer $TOK" -d '{"id" : "test"}' HTTP/1.1 500 Internal Server Error
It is not intended to allow passing Ids when creating any entity - it results in undefined behavior right now. Dealing with that problem will be covered by https://github.com/Waziup/WaziGate/issues/161.
If you try to create a device twice, it result in an error 500: