diff --git a/apps/emqx_bridge_http/src/emqx_bridge_http_connector.erl b/apps/emqx_bridge_http/src/emqx_bridge_http_connector.erl index 81acec602..a148a4d16 100644 --- a/apps/emqx_bridge_http/src/emqx_bridge_http_connector.erl +++ b/apps/emqx_bridge_http/src/emqx_bridge_http_connector.erl @@ -38,6 +38,7 @@ ]). -export([reply_delegator/3]). +-export([render_template/2]). -export([ roots/0, @@ -266,8 +267,8 @@ on_add_channel( ) -> InstalledActions = maps:get(installed_actions, OldState, #{}), {ok, ActionState} = do_create_http_action(ActionConfig), - RenderTemplate = maps:get(render_template_func, ActionConfig, fun render_template/2), - ActionState1 = ActionState#{render_template_func => RenderTemplate}, + RenderTmplFunc = maps:get(render_template_func, ActionConfig, fun ?MODULE:render_template/2), + ActionState1 = ActionState#{render_template_func => RenderTmplFunc}, NewInstalledActions = maps:put(ActionId, ActionState1, InstalledActions), NewState = maps:put(installed_actions, NewInstalledActions, OldState), {ok, NewState}. diff --git a/apps/emqx_bridge_http/test/emqx_bridge_http_SUITE.erl b/apps/emqx_bridge_http/test/emqx_bridge_http_SUITE.erl index 3b7303300..932191ec5 100644 --- a/apps/emqx_bridge_http/test/emqx_bridge_http_SUITE.erl +++ b/apps/emqx_bridge_http/test/emqx_bridge_http_SUITE.erl @@ -146,7 +146,7 @@ end_per_testcase(_TestCase, Config) -> %%------------------------------------------------------------------------------ %% HTTP server for testing -%% (Orginally copied from emqx_bridge_api_SUITE) +%% (Originally copied from emqx_bridge_api_SUITE) %%------------------------------------------------------------------------------ start_http_server(HTTPServerConfig) -> process_flag(trap_exit, true), diff --git a/changes/feat-12348.en.md b/changes/feat-12348.en.md new file mode 100644 index 000000000..cf84bf5e2 --- /dev/null +++ b/changes/feat-12348.en.md @@ -0,0 +1 @@ +Added support for Elasticsearch Bridge. diff --git a/scripts/spellcheck/dicts/emqx.txt b/scripts/spellcheck/dicts/emqx.txt index 1d98d82db..c2f5f54ef 100644 --- a/scripts/spellcheck/dicts/emqx.txt +++ b/scripts/spellcheck/dicts/emqx.txt @@ -299,3 +299,5 @@ now_us ns elasticsearch ElasticSearch +doc_as_upsert +upsert