add: macro endpoint for execution
This commit is contained in:
parent
01ffb1d58d
commit
d3fd48b35a
9 changed files with 110 additions and 26 deletions
src/endpoints
|
@ -86,11 +86,11 @@ api_v1_macros_STR_PUT(struct mg_connection *nc, struct http_message *hm, endpoin
|
|||
}
|
||||
}
|
||||
|
||||
macro_action_delete_for_macro(macro->id);
|
||||
|
||||
cJSON *json_actions = cJSON_GetObjectItemCaseSensitive(json, "actions");
|
||||
if(cJSON_IsArray(json_actions))
|
||||
{
|
||||
macro_action_delete_for_macro(macro->id);
|
||||
|
||||
cJSON *json_action;
|
||||
cJSON_ArrayForEach(json_action, json_actions)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue