add: tests
This commit is contained in:
parent
dd98af4edc
commit
be045f59d4
11 changed files with 257 additions and 30 deletions
endpoints
|
@ -243,6 +243,11 @@ api_v1_controllers_discover_POST(struct mg_connection *c, endpoint_args_t *args,
|
|||
discovered_controller->port = discovered_command_port;
|
||||
discovered_controller->active = 1;
|
||||
|
||||
// TODO get relays during discovery
|
||||
relay_t **discovered_relays = malloc(sizeof(relay_t*));
|
||||
discovered_relays[0] = NULL;
|
||||
discovered_controller->relays = discovered_relays;
|
||||
|
||||
controller_save(discovered_controller);
|
||||
controller_free(discovered_controller);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue