fix(webhook): fix config entry web.hook.api.url -> web.hook.url
This commit is contained in:
parent
319d44d1bf
commit
026e1494fb
|
@ -11,7 +11,7 @@ Please see: [EMQ X - WebHook](https://docs.emqx.io/broker/latest/en/advanced/web
|
||||||
## The web services URL for Hook request
|
## The web services URL for Hook request
|
||||||
##
|
##
|
||||||
## Value: String
|
## Value: String
|
||||||
web.hook.api.url = http://127.0.0.1:8080
|
web.hook.url = http://127.0.0.1:8080
|
||||||
|
|
||||||
## Encode message payload field
|
## Encode message payload field
|
||||||
##
|
##
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
## Webhook URL
|
## Webhook URL
|
||||||
##
|
##
|
||||||
## Value: String
|
## Value: String
|
||||||
web.hook.api.url = http://127.0.0.1:80
|
web.hook.url = http://127.0.0.1:80
|
||||||
|
|
||||||
## HTTP Headers
|
## HTTP Headers
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
%%-*- mode: erlang -*-
|
%%-*- mode: erlang -*-
|
||||||
%% EMQ X R3.0 config mapping
|
%% EMQ X R3.0 config mapping
|
||||||
|
|
||||||
{mapping, "web.hook.api.url", "emqx_web_hook.url", [
|
{mapping, "web.hook.url", "emqx_web_hook.url", [
|
||||||
{datatype, string}
|
{datatype, string}
|
||||||
]}.
|
]}.
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ prop_confs() ->
|
||||||
Schema = cuttlefish_schema:files(filelib:wildcard(code:priv_dir(emqx_web_hook) ++ "/*.schema")),
|
Schema = cuttlefish_schema:files(filelib:wildcard(code:priv_dir(emqx_web_hook) ++ "/*.schema")),
|
||||||
?ALL({Url, Confs0}, {url(), confs()},
|
?ALL({Url, Confs0}, {url(), confs()},
|
||||||
begin
|
begin
|
||||||
Confs = [{"web.hook.api.url", Url}|Confs0],
|
Confs = [{"web.hook.url", Url}|Confs0],
|
||||||
Envs = cuttlefish_generator:map(Schema, cuttlefish_conf_file(Confs)),
|
Envs = cuttlefish_generator:map(Schema, cuttlefish_conf_file(Confs)),
|
||||||
|
|
||||||
assert_confs(Confs, Envs),
|
assert_confs(Confs, Envs),
|
||||||
|
@ -66,7 +66,7 @@ set_special_cfgs(_) ->
|
||||||
application:set_env(emqx, modules_loaded_file, undefined),
|
application:set_env(emqx, modules_loaded_file, undefined),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
assert_confs([{"web.hook.api.url", Url}|More], Envs) ->
|
assert_confs([{"web.hook.url", Url}|More], Envs) ->
|
||||||
%% Assert!
|
%% Assert!
|
||||||
Url = deep_get_env("emqx_web_hook.url", Envs),
|
Url = deep_get_env("emqx_web_hook.url", Envs),
|
||||||
assert_confs(More, Envs);
|
assert_confs(More, Envs);
|
||||||
|
|
Loading…
Reference in New Issue