Quellcode durchsuchen

fix(webhook): fix config entry web.hook.api.url -> web.hook.url

Zaiming Shi vor 5 Jahren
Ursprung
Commit
026e1494fb

+ 1 - 1
apps/emqx_web_hook/README.md

@@ -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
 ##
 ## 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
 ##

+ 1 - 1
apps/emqx_web_hook/etc/emqx_web_hook.conf

@@ -5,7 +5,7 @@
 ## Webhook URL
 ##
 ## Value: String
-web.hook.api.url = http://127.0.0.1:80
+web.hook.url = http://127.0.0.1:80
 
 ## HTTP Headers
 ##

+ 1 - 1
apps/emqx_web_hook/priv/emqx_web_hook.schema

@@ -1,7 +1,7 @@
 %%-*- mode: erlang -*-
 %% 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}
 ]}.
 

+ 2 - 2
apps/emqx_web_hook/test/props/prop_webhook_confs.erl

@@ -36,7 +36,7 @@ prop_confs() ->
     Schema = cuttlefish_schema:files(filelib:wildcard(code:priv_dir(emqx_web_hook) ++ "/*.schema")),
     ?ALL({Url, Confs0}, {url(), confs()},
         begin
-            Confs = [{"web.hook.api.url", Url}|Confs0],
+            Confs = [{"web.hook.url", Url}|Confs0],
             Envs = cuttlefish_generator:map(Schema, cuttlefish_conf_file(Confs)),
 
             assert_confs(Confs, Envs),
@@ -66,7 +66,7 @@ set_special_cfgs(_) ->
     application:set_env(emqx, modules_loaded_file, undefined),
     ok.
 
-assert_confs([{"web.hook.api.url", Url}|More], Envs) ->
+assert_confs([{"web.hook.url", Url}|More], Envs) ->
     %% Assert!
     Url = deep_get_env("emqx_web_hook.url", Envs),
     assert_confs(More, Envs);