add: macro endpoint for execution
This commit is contained in:
parent
01ffb1d58d
commit
d3fd48b35a
9 changed files with 110 additions and 26 deletions
include
|
@ -18,4 +18,7 @@ api_v1_macros_STR_PUT(struct mg_connection *nc, struct http_message *hm, endpoin
|
|||
void
|
||||
api_v1_macros_STR_DELETE(struct mg_connection *nc, struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response);
|
||||
|
||||
void
|
||||
api_v1_macros_STR_execute_PUT(struct mg_connection *nc, struct http_message *hm, endpoint_args_t *args, endpoint_response_t *response);
|
||||
|
||||
#endif /* CORE_ENDPOINTS_API_V1_MACROS_H */
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <cJSON.h>
|
||||
|
||||
#include <constants.h>
|
||||
#include <models/period.h>
|
||||
#include <models/macro_action.h>
|
||||
|
||||
typedef struct
|
||||
|
@ -43,4 +42,7 @@ macro_get_by_uid(uuid_t uid);
|
|||
macro_t**
|
||||
macro_get_all();
|
||||
|
||||
int*
|
||||
macro_get_target_relay_ids(int macro_id);
|
||||
|
||||
#endif /* CORE_MACRO_H */
|
||||
|
|
|
@ -18,6 +18,9 @@ macro_action_delete_for_macro(int macro_id);
|
|||
macro_action_t**
|
||||
macro_action_get_for_macro(int macro_id);
|
||||
|
||||
int
|
||||
macro_action_execute(macro_action_t *macro_action);
|
||||
|
||||
void
|
||||
macro_action_free_list(macro_action_t **macro_actions);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue