add: macro endpoints
add: basic macro support fix: database locking with lock-pointer fix: memory leaks
This commit is contained in:
parent
6a2b94ef1c
commit
9d2c48d645
30 changed files with 606 additions and 213 deletions
src
|
@ -10,6 +10,7 @@
|
|||
#include <endpoints/api_v1_controllers.h>
|
||||
#include <endpoints/api_v1_relays.h>
|
||||
#include <endpoints/api_v1_tags.h>
|
||||
#include <endpoints/api_v1_macros.h>
|
||||
#include <endpoints/api_v1_ws.h>
|
||||
|
||||
static endpoint_t endpoints[ROUTER_ENDPOINTS_MAX_COUNT];
|
||||
|
@ -90,6 +91,11 @@ router_init()
|
|||
router_register_endpoint("/api/v1/tags/{str}", HTTP_METHOD_GET, api_v1_tags_STR_GET);
|
||||
router_register_endpoint("/api/v1/tags/{str}", HTTP_METHOD_DELETE, api_v1_tags_STR_DELETE);
|
||||
|
||||
router_register_endpoint("/api/v1/macros/", HTTP_METHOD_GET, api_v1_macros_GET);
|
||||
router_register_endpoint("/api/v1/macros/", HTTP_METHOD_POST, api_v1_macros_POST);
|
||||
//router_register_endpoint("/api/v1/macros/{str}", HTTP_METHOD_GET, api_v1_macros_STR_GET);
|
||||
//router_register_endpoint("/api/v1/macros/{str}", HTTP_METHOD_DELETE, api_v1_macros_STR_DELETE);
|
||||
|
||||
router_register_endpoint("/api/v1/ws/relays", HTTP_METHOD_WEBSOCKET, api_v1_ws_relays);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue