[−][src]Function proj17_iot_server::endpoints::devices_endpoints::register_json
pub fn register_json(body: Json<RegisterBody>) -> Option<JsonValue>
Registers a specified tracker from a specified receiver, granted both exist, where the arguments are given as request body.
Responds with:
- 200: if the tracker and receiver exist.
- 404: if either the receiver or tracker does not exist
This is an API endpoint mapped to
- /register [POST]
Arguments
- Post body (json):
{ loc: <receiver_id>, tag: <tracker_id> }