Add license handler for setting license in restful plugin

This commit is contained in:
eeff
2022-03-16 16:10:55 +08:00
parent 3bd4ce2299
commit 5f37f21b97
+7
View File
@@ -32,6 +32,7 @@
#include "datatag_handle.h"
#include "group_config_handle.h"
#include "http.h"
#include "license_handle.h"
#include "log_handle.h"
#include "normal_handle.h"
#include "plugin_handle.h"
@@ -290,6 +291,12 @@ struct neu_rest_handler api_handlers[] = {
.url = "/api/v2/log",
.value.handler = handle_get_log,
},
{
.method = NEU_REST_METHOD_POST,
.type = NEU_REST_HANDLER_FUNCTION,
.url = "/api/v2/license",
.value.handler = handle_set_license,
},
};
void neu_rest_web_handler(const struct neu_rest_handler **handlers,