Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ set(NEURON_SOURCES
plugins/restful/otel_handle.c
plugins/restful/cid_handle.c
plugins/restful/tpy_handle.c
plugins/restful/system_handle.c
plugins/restful/datalayers_handle.c
plugins/restful/rest.c
plugins/restful/user.c
Expand Down
10 changes: 0 additions & 10 deletions plugins/restful/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "plugin_handle.h"
#include "rw_handle.h"
#include "scan_handle.h"
#include "system_handle.h"
#include "tpy_handle.h"
#include "utils/http.h"
#include "version_handle.h"
Expand Down Expand Up @@ -146,9 +145,6 @@ static struct neu_http_handler cors_handler[] = {
{
.url = "/api/v2/tpy",
},
{
.url = "/api/v2/system/ctl",
},
{
.url = "/api/v2/users",
},
Expand Down Expand Up @@ -552,12 +548,6 @@ static struct neu_http_handler rest_handlers[] = {
.url = "/api/v2/otel",
.value.handler = handle_otel_get,
},
{
.method = NEU_HTTP_METHOD_POST,
.type = NEU_HTTP_HANDLER_FUNCTION,
.url = "/api/v2/system/ctl",
.value.handler = handle_system_ctl,
},
{
.method = NEU_HTTP_METHOD_GET,
.type = NEU_HTTP_HANDLER_FUNCTION,
Expand Down
32 changes: 0 additions & 32 deletions plugins/restful/system_handle.c

This file was deleted.

27 changes: 0 additions & 27 deletions plugins/restful/system_handle.h

This file was deleted.

75 changes: 0 additions & 75 deletions src/parser/neu_json_system.c

This file was deleted.

43 changes: 0 additions & 43 deletions src/parser/neu_json_system.h

This file was deleted.

16 changes: 1 addition & 15 deletions tests/ut/json_test.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#include <gtest/gtest.h>

#include "json/json.h"

#include "utils/log.h"

#include "parser/neu_json_system.h"
#include "json/json.h"

zlog_category_t *neuron = NULL;
TEST(JsonTest, DecodeField)
Expand Down Expand Up @@ -331,17 +328,6 @@ TEST(JsonTest, EncodeArray)
neu_json_decode_free(ob);
}

TEST(JsonTest, System_ctl)
{
char * buf = (char *) "{\"action\": 1}";
char * buf1 = (char *) "{\"action1\": 1}";
neu_json_system_ctl_req_t *req = NULL;
EXPECT_EQ(-1, neu_json_decode_system_ctl_req(buf1, &req));
EXPECT_EQ(0, neu_json_decode_system_ctl_req(buf, &req));
EXPECT_EQ(1, req->action);
free(req);
}

int main(int argc, char **argv)
{
zlog_init("./config/dev.conf");
Expand Down
Loading