rm system api

This commit is contained in:
fengzero
2026-07-16 07:54:29 +00:00
parent 6a836b9fd5
commit 33b795c6dc
7 changed files with 1 additions and 203 deletions
-10
View File
@@ -39,7 +39,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"
@@ -150,9 +149,6 @@ static struct neu_http_handler cors_handler[] = {
{
.url = "/api/v2/ede",
},
{
.url = "/api/v2/system/ctl",
},
{
.url = "/api/v2/users",
},
@@ -571,12 +567,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,
-32
View File
@@ -1,32 +0,0 @@
#include <dirent.h>
#include <errno.h>
#include <getopt.h>
#include <jwt.h>
#include <libgen.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "json/neu_json_fn.h"
#include "handle.h"
#include "utils/http.h"
#include "utils/neu_jwt.h"
#include "parser/neu_json_system.h"
#include "system_handle.h"
void handle_system_ctl(nng_aio *aio)
{
NEU_PROCESS_HTTP_REQUEST_VALIDATE_JWT(
aio, neu_json_system_ctl_req_t, neu_json_decode_system_ctl_req, {
if (req->action == 1) {
neu_http_ok(aio, "{\"error\": 0 }");
exit(-2);
}
})
}
-27
View File
@@ -1,27 +0,0 @@
/**
* NEURON IIoT System for Industry 4.0
* Copyright (C) 2020-2022 EMQ Technologies Co., Ltd All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
#ifndef _NEU_SYSTEM_HANDLE_H_
#define _NEU_SYSTEM_HANDLE_H_
#include <nng/nng.h>
void handle_system_ctl(nng_aio *aio);
#endif