add: relay endpoint
fix: discovery invalid read
This commit is contained in:
parent
1171ef22be
commit
a127a68e31
5 changed files with 61 additions and 2 deletions
include
9
include/endpoints/api_v1_relays.h
Normal file
9
include/endpoints/api_v1_relays.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef CORE_ENDPOINTS_API_V1_RELAYS_H
|
||||
#define CORE_ENDPOINTS_API_V1_RELAYS_H
|
||||
|
||||
#include <router.h>
|
||||
|
||||
void
|
||||
api_v1_relays_GET(struct mg_connection *c, endpoint_args_t *args, struct http_message *hm);
|
||||
|
||||
#endif /* CORE_ENDPOINTS_API_V1_RELAYS_H */
|
|
@ -4,6 +4,7 @@
|
|||
#include <uuid/uuid.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include <constants.h>
|
||||
#include <cJSON.h>
|
||||
#include <helpers.h>
|
||||
#include <models/relay.h>
|
||||
|
@ -12,7 +13,7 @@ typedef struct
|
|||
{
|
||||
int id;
|
||||
uuid_t uid;
|
||||
char name[128];
|
||||
char name[MAX_NAME_LENGTH + 1];
|
||||
char ip[17];
|
||||
int active;
|
||||
int port;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue