From 5f37f21b97ca3afd543a522e4e953b0e29ef1b92 Mon Sep 17 00:00:00 2001 From: eeff <33566201+eeff@users.noreply.github.com> Date: Wed, 16 Mar 2022 16:10:55 +0800 Subject: [PATCH] Add license handler for setting license in restful plugin --- plugins/restful/handle.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/restful/handle.c b/plugins/restful/handle.c index 2dc19b38..f6b8782c 100644 --- a/plugins/restful/handle.c +++ b/plugins/restful/handle.c @@ -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,